Make the --flx flag work on Linux (#3065)

Previously we would error out because of a lack of positional arguments.
This commit is contained in:
Adam Barth
2016-09-27 16:13:44 -07:00
committed by GitHub
parent cfc2b0cd1b
commit e105e697f8
+4 -6
View File
@@ -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<shell::PlatformViewGLFW> platform_view(
new shell::PlatformViewGLFW());