Skip to content

Commit

Permalink
fix(cli): inject config feature flags when features arg is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Nov 18, 2022
1 parent 7e3d672 commit 1ecaeb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changes/fix-config-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---

Fixes injection of Cargo features defined in the configuration file.
7 changes: 4 additions & 3 deletions tooling/cli/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ pub fn command(mut options: Options) -> Result<()> {
options.runner = config_.build.runner.clone();
}

if let Some(list) = options.features.as_mut() {
list.extend(config_.build.features.clone().unwrap_or_default());
}
options
.features
.get_or_insert(Vec::new())
.extend(config_.build.features.clone().unwrap_or_default());

let bin_path = app_settings.app_binary_path(&interface_options)?;
let out_dir = bin_path.parent().unwrap();
Expand Down

0 comments on commit 1ecaeb2

Please sign in to comment.