diff --git a/core/tests/restart/src/main.rs b/core/tests/restart/src/main.rs index 79fe1bf2f..012f85bbb 100644 --- a/core/tests/restart/src/main.rs +++ b/core/tests/restart/src/main.rs @@ -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 => {} };