Skip to content

Commit

Permalink
fix: fix misinterprete of tauri's application args
Browse files Browse the repository at this point in the history
  • Loading branch information
4o3F committed Apr 8, 2024
1 parent 8c99542 commit bc769ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/tauri/src/core/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ use crate::utils;
pub struct Cli {
#[command(subcommand)]
command: Option<Commands>,
#[arg(raw = true)]
args: Vec<String>,
}

#[derive(Subcommand, Debug)]
Expand Down Expand Up @@ -59,6 +61,8 @@ pub fn parse() -> anyhow::Result<()> {
Some(appimage) => std::path::PathBuf::from_str(&appimage).unwrap(),
None => current_exe().unwrap(),
};
let mut args = args.clone();
args.extend(vec!["--".to_string()]);
std::process::Command::new(path).args(args).spawn().unwrap();
}
}
Expand Down

0 comments on commit bc769ac

Please sign in to comment.