Module: Utils::Browser Private

Defined in:
utils/browser.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.

Class Method Summary collapse

Class Method Details

.open(*args) ⇒ void

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.

This method returns an undefined value.

Parameters:



12
13
14
15
16
17
18
19
20
21
22
# File 'utils/browser.rb', line 12

def open(*args)
  browser = Homebrew::EnvConfig.browser
  browser ||= OS::PATH_OPEN if defined?(OS::PATH_OPEN)
  return unless browser

  ENV["DISPLAY"] = Homebrew::EnvConfig.display

  Utils::Shell.with_env(DBUS_SESSION_BUS_ADDRESS: ENV.fetch("HOMEBREW_DBUS_SESSION_BUS_ADDRESS", nil)) do
    SystemCommand.safe_system(browser, *args)
  end
end