mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user