fix(core): fix wrong handler override on macOS bundle
This commit is contained in:
parent
a8522720a2
commit
4734eabb0d
|
@ -325,12 +325,12 @@ fn main() {
|
||||||
.find(|cli| matches.subcommand_matches(&cli.subcommand).is_some());
|
.find(|cli| matches.subcommand_matches(&cli.subcommand).is_some());
|
||||||
|
|
||||||
// When started from the macOS App Bundle, override the default
|
// When started from the macOS App Bundle, override the default
|
||||||
// handler with "launcher", otherwise the GUI could not be started.
|
// handler with "launcher" if not present, otherwise the GUI could not be started.
|
||||||
if let Some(context) = std::env::var_os("MAC_LAUNCH_CONTEXT") {
|
if handler.is_none() {
|
||||||
if context == "bundle" {
|
if let Some(context) = std::env::var_os("MAC_LAUNCH_CONTEXT") {
|
||||||
handler = CLI_HANDLERS
|
if context == "bundle" {
|
||||||
.iter()
|
handler = CLI_HANDLERS.iter().find(|cli| cli.subcommand == "launcher");
|
||||||
.find(|cli| cli.subcommand == "launcher");
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user