From 085a778b0a9b7e87f9b1698e31fc745ac9de2118 Mon Sep 17 00:00:00 2001 From: Pat Hawks Date: Mon, 4 Jan 2016 11:46:25 -0800 Subject: [PATCH] Rubocop: Style/NestedTernaryOperator - Ternary operators must not be nested. Prefer if/else constructs instead. --- lib/jekyll/commands/serve.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/commands/serve.rb b/lib/jekyll/commands/serve.rb index 507a8c713..29408fe23 100644 --- a/lib/jekyll/commands/serve.rb +++ b/lib/jekyll/commands/serve.rb @@ -123,7 +123,14 @@ module Jekyll private def launch_browser(server, opts) - command = Utils::Platforms.windows?? "start" : Utils::Platforms.osx?? "open" : "xdg-open" + command = + if Utils::Platforms.windows? + "start" + elsif Utils::Platforms.osx? + "open" + else + "xdg-open" + end system command, server_address(server, opts) end