Merge pull request #4717 from jekyll/cleanup-launch-browser

Merge pull request 4717
This commit is contained in:
jekyllbot 2016-03-31 18:40:15 -07:00
commit a224491d20
1 changed files with 6 additions and 9 deletions

View File

@ -127,15 +127,12 @@ module Jekyll
private private
def launch_browser(server, opts) def launch_browser(server, opts)
command = address = server_address(server, opts)
if Utils::Platforms.windows? return system "start", address if Utils::Platforms.windows?
"start" return system "xdg-open", address if Utils::Platforms.linux?
elsif Utils::Platforms.osx? return system "open", address if Utils::Platforms.osx?
"open" Jekyll.logger.error "Refusing to launch browser; " \
else "Platform launcher unknown."
"xdg-open"
end
system command, server_address(server, opts)
end end
# Keep in our area with a thread or detach the server as requested # Keep in our area with a thread or detach the server as requested