mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
fix(core): clear env args on restart test
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use tauri::Env;
|
||||
|
||||
fn main() {
|
||||
let mut argv = std::env::args();
|
||||
let argc = argv.len();
|
||||
@@ -17,7 +19,11 @@ fn main() {
|
||||
);
|
||||
|
||||
match argv.nth(1).as_deref() {
|
||||
Some("restart") => tauri::api::process::restart(&Default::default()),
|
||||
Some("restart") => {
|
||||
let mut env = Env::default();
|
||||
env.args.clear();
|
||||
tauri::api::process::restart(&env)
|
||||
}
|
||||
Some(invalid) => panic!("only argument `restart` is allowed, {} is invalid", invalid),
|
||||
None => {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user