Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions exe/google_oauth_initializer
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,20 @@ end

def open_browser(url)
res = nil
if OS.windows?
res = system('start', url)
elsif OS.mac?
res = system('open', url)
elsif OS.linux?
res = system('xdg-open', url)
end

if (res.nil? || res == false)
puts 'Open below URL with your browser'
puts url
begin
if OS.windows?
res = system('start', url)
elsif OS.mac?
res = system('open', url)
elsif OS.linux?
res = system('xdg-open', url)
end
rescue

if (res.nil? || res == false)
puts 'Open below URL with your browser'
puts url
end
end
end

Expand Down