Module: OS::Linux::Bundle::Skipper::ClassMethods Private
- Defined in:
- extend/os/linux/bundle/skipper.rb
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Instance Method Summary collapse
- #macos_only_cask?(entry) ⇒ Boolean private
- #macos_only_entry?(entry) ⇒ Boolean private
- #skip?(entry, silent: false) ⇒ Boolean private
Instance Method Details
#macos_only_cask?(entry) ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
18 19 20 21 22 23 24 25 26 27 28 |
# File 'extend/os/linux/bundle/skipper.rb', line 18 def macos_only_cask?(entry) return false if entry.type != :cask cask = ::Cask::CaskLoader.load(entry.name) installer = ::Cask::Installer.new(cask) installer.check_stanza_os_requirements false rescue ::Cask::CaskError true end |
#macos_only_entry?(entry) ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
13 14 15 |
# File 'extend/os/linux/bundle/skipper.rb', line 13 def macos_only_entry?(entry) entry.type == :mas end |
#skip?(entry, silent: false) ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'extend/os/linux/bundle/skipper.rb', line 30 def skip?(entry, silent: false) if macos_only_entry?(entry) || macos_only_cask?(entry) unless silent $stdout.puts Formatter.warning "Skipping #{entry.type} #{entry.name} (unsupported on Linux)" end true else super(entry) end end |