Skip to content

Commit

Permalink
fix(cli): Clone Options struct after mutating it. (#9188)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars committed Mar 19, 2024
1 parent e3b6d38 commit 77cc49a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/runner-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'tauri-cli': 'patch:bug'
'@tauri-apps/cli': 'patch:bug'
---

Fixed an issue causing the `build.runner` and `build.features` configs to not take effect.
2 changes: 1 addition & 1 deletion tooling/cli/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> {

let mut interface = AppInterface::new(config_, options.target.clone())?;
let app_settings = interface.app_settings();
let interface_options = options.clone().into();

if let Some(before_build) = config_.build.before_build_command.clone() {
run_hook(
Expand Down Expand Up @@ -169,6 +168,7 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> {
.get_or_insert(Vec::new())
.extend(config_.build.features.clone().unwrap_or_default());

let interface_options = options.clone().into();
let bin_path = app_settings.app_binary_path(&interface_options)?;
let out_dir = bin_path.parent().unwrap();

Expand Down

0 comments on commit 77cc49a

Please sign in to comment.