From e105e697f8a16e02695d9ffb225221e008b856b7 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 27 Sep 2016 16:13:44 -0700 Subject: [PATCH] Make the --flx flag work on Linux (#3065) Previously we would error out because of a lack of positional arguments. --- shell/platform/linux/main_linux.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/shell/platform/linux/main_linux.cc b/shell/platform/linux/main_linux.cc index 5f71f801e..3d4164d48 100644 --- a/shell/platform/linux/main_linux.cc +++ b/shell/platform/linux/main_linux.cc @@ -47,21 +47,19 @@ int RunInteractive() { mojo::embedder::Init(mojo::embedder::CreateSimplePlatformSupport()); shell::Shell::InitStandalone(); - auto args = command_line.GetArgs(); - if (args.empty()) - return 1; - std::string bundle_path = command_line.GetSwitchValueASCII(shell::switches::kFLX); if (bundle_path.empty()) { // Alternatively, use the first positional argument. + auto args = command_line.GetArgs(); + if (args.empty()) + return 1; bundle_path = args[0]; } - if (bundle_path.empty()) { + if (bundle_path.empty()) return 1; - } std::unique_ptr platform_view( new shell::PlatformViewGLFW());