From 77cc49ac3cd27368b3be4f67e35ae021acee4c92 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Tue, 19 Mar 2024 14:37:12 +0100 Subject: [PATCH] fix(cli): Clone Options struct after mutating it. (#9188) --- .changes/runner-config.md | 6 ++++++ tooling/cli/src/build.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/runner-config.md diff --git a/.changes/runner-config.md b/.changes/runner-config.md new file mode 100644 index 000000000000..c810ccfbba87 --- /dev/null +++ b/.changes/runner-config.md @@ -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. diff --git a/tooling/cli/src/build.rs b/tooling/cli/src/build.rs index b3e5bf692c14..d8fc8d162f5d 100644 --- a/tooling/cli/src/build.rs +++ b/tooling/cli/src/build.rs @@ -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( @@ -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();