Enable minibrowser by default but also keep the option to disable it (#30338)

* enable minibrowser by default

* review fix

* rename no_minibrowser to no-minibrowser

* review fix
This commit is contained in:
Atbrakhi 2023-09-13 08:31:19 +02:00 committed by GitHub
parent 0d1abdce2c
commit c066f6a226
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -418,7 +418,7 @@ pub fn default_opts() -> Opts {
unminify_js: false,
local_script_source: None,
print_pwm: false,
minibrowser: false,
minibrowser: true,
}
}
@ -557,7 +557,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
"Directory root with unminified scripts",
"",
);
opts.optflag("", "minibrowser", "Open minibrowser");
opts.optflag("", "no-minibrowser", "Open minibrowser");
let opt_match = match opts.parse(args) {
Ok(m) => m,
@ -773,7 +773,7 @@ pub fn from_cmdline_args(mut opts: Options, args: &[String]) -> ArgumentParsingR
unminify_js: opt_match.opt_present("unminify-js"),
local_script_source: opt_match.opt_str("local-script-source"),
print_pwm: opt_match.opt_present("print-pwm"),
minibrowser: opt_match.opt_present("minibrowser"),
minibrowser: !opt_match.opt_present("no-minibrowser"),
};
set_options(opts);