Module: OS::Linux::SimulateSystem Private

Defined in:
extend/os/linux/simulate_system.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

#current_osSymbol

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.

Returns:



21
22
23
# File 'extend/os/linux/simulate_system.rb', line 21

def current_os
  os || :linux
end

#osSymbol?

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.

Returns:



8
9
10
11
12
13
# File 'extend/os/linux/simulate_system.rb', line 8

def os
  @os ||= T.let(nil, T.nilable(Symbol))
  return :macos if @os.blank? && Homebrew::EnvConfig.simulate_macos_on_linux?

  @os
end

#simulating_or_running_on_linux?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.

Returns:

  • (Boolean)


16
17
18
# File 'extend/os/linux/simulate_system.rb', line 16

def simulating_or_running_on_linux?
  os.blank? || os == :linux
end