Merge pull request #4717 from jekyll/cleanup-launch-browser
Merge pull request 4717
This commit is contained in:
commit
a224491d20
|
@ -127,15 +127,12 @@ module Jekyll
|
|||
|
||||
private
|
||||
def launch_browser(server, opts)
|
||||
command =
|
||||
if Utils::Platforms.windows?
|
||||
"start"
|
||||
elsif Utils::Platforms.osx?
|
||||
"open"
|
||||
else
|
||||
"xdg-open"
|
||||
end
|
||||
system command, server_address(server, opts)
|
||||
address = server_address(server, opts)
|
||||
return system "start", address if Utils::Platforms.windows?
|
||||
return system "xdg-open", address if Utils::Platforms.linux?
|
||||
return system "open", address if Utils::Platforms.osx?
|
||||
Jekyll.logger.error "Refusing to launch browser; " \
|
||||
"Platform launcher unknown."
|
||||
end
|
||||
|
||||
# Keep in our area with a thread or detach the server as requested
|
||||
|
|
Loading…
Reference in New Issue