[bug] tauri-cli incorrectly parses application arguments #5415
Labels
scope: cli.rs
The tauri-cli rust crate
status: needs triage
This issue needs to triage, applied to new issues
type: bug
Describe the bug
Running
cargo tauri dev -- -- --myoption
causes tauri to pass--no-default-features
to my application. That meanscargo build
doesn't get that flag, and it means my application crashes becauseclap
isn't expecting the--no-default-features
flag in my application.This seems to be due to this code:
tauri/tooling/cli/src/interface/rust.rs
Line 303 in 4036e15
After that line the rest of the function splits up
args
intoargs
andrun_args
by looking for--
. Since--no-default-features
ispush
ed ontoargs
beforehand, it will incorrectly end up inrun_args
.Likely the code that pushes
--no-default-features
should either use an insert to put the flag at the beginning ofargs
, or the push needs to occur afterrun_args
has been split off.Reproduction
No response
Expected behavior
No response
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: