Linuxbrew: Use xdg-open
Closes Homebrew/homebrew#29817. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
96195295a3
commit
ae3e567daa
@ -6,4 +6,13 @@ module OS
|
||||
def self.linux?
|
||||
/linux/i === RUBY_PLATFORM
|
||||
end
|
||||
|
||||
# Utilities
|
||||
if OS.mac?
|
||||
PATH_OPEN = "/usr/bin/open"
|
||||
elsif OS.linux?
|
||||
PATH_OPEN = "xdg-open"
|
||||
else
|
||||
raise "Unknown operating system"
|
||||
end
|
||||
end
|
||||
|
||||
@ -206,7 +206,7 @@ def exec_editor *args
|
||||
end
|
||||
|
||||
def exec_browser *args
|
||||
browser = ENV['HOMEBREW_BROWSER'] || ENV['BROWSER'] || "open"
|
||||
browser = ENV['HOMEBREW_BROWSER'] || ENV['BROWSER'] || OS::PATH_OPEN
|
||||
safe_exec(browser, *args)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user