Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove os_version_only support from caveats #7794

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions lib/cask/caveats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,31 +133,6 @@ def arch_only(*supported_arches)
end
end

# minor bug: because output from os_version_only is conditional, the
# existence of this directive causes the "===> Caveats" header to
# appear even if no warning is output. One workaround would
# be to spin out os-version-detection from caveats into a separate
# Cask stanza, and that is probably a sensible design.
def os_version_only(*supported_versions)
known_versions = %w{10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10}
supported_versions.each do |version|
unless known_versions.include?(version)
raise CaskInvalidError.new(@cask, "The only valid arguments to caveats os_version_only are: #{known_versions.utf8_inspect}")
end
end
unless supported_versions.include?(MACOS_VERSION)
puts <<-EOS.undent
Cask #{@cask} provides binaries for these OS versions: #{supported_versions.join(', ')}.
But you appear to be running on an unsupported version

#{MACOS_VERSION}

Therefore #{@cask} is not expected to work on your system.

EOS
end
end

def x11_required
unless File.exist?('/usr/X11/bin/X')
puts <<-EOS.undent
Expand Down