Browse Source

fix(cli): detect `--profile`. closes #6255 (#6268)

Amr Bashir 2 năm trước cách đây
mục cha
commit
bfa69691a5

+ 5 - 0
.changes/cli-detect-profile.md

@@ -0,0 +1,5 @@
+---
+'tauri': 'patch'
+---
+
+Fix passing `--profile` to cargo in `tauri build` causing conflict with `--release` passed by the CLI.

+ 1 - 1
tooling/cli/src/interface/rust/desktop.rs

@@ -291,7 +291,7 @@ fn build_command(
     args.push(features.join(","));
   }
 
-  if !options.debug {
+  if !options.debug && !args.contains(&"--profile".to_string()) {
     args.push("--release".into());
   }