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
Instance Method Details
#requires_macos?(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.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'extend/os/linux/bundle/skipper.rb', line 11 def requires_macos?(entry) case entry.type when :mas true when :cask !::Cask::CaskLoader.load(entry.name).supports_linux? else false end rescue ::Cask::CaskError # If the cask can't be loaded, it may be from a tap that hasn't been # tapped yet. Don't assume macOS-only in that case — let the normal # install flow handle it after the tap is processed. full_name = T.cast(entry.[:full_name], T.nilable(String)) return false if full_name&.include?("/") true end |
#unsupported_reason(entry) ⇒ String?
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.
31 32 33 34 35 36 |
# File 'extend/os/linux/bundle/skipper.rb', line 31 def unsupported_reason(entry) return "requires WSL" if entry.type == :winget && !OS.wsl? return "requires macOS" if requires_macos?(entry) super end |