diff --git a/CHANGELOG.md b/CHANGELOG.md index 6634c3c..6ccefda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] +### Fixed + +- Do not propagate the `CARGO_UNSTABLE_BUILD_STD` environment variable to the build of the runner (#7). + [Unreleased]: https://github.com/ronnychevalier/cargo-multivers/compare/v0.7.0...HEAD ## [0.7.0] - 18-12-2023 diff --git a/src/runner.rs b/src/runner.rs index 1cd6798..e91eee6 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -78,11 +78,16 @@ impl RunnerBuilder { builds_path: &Path, original_filename: &OsStr, ) -> anyhow::Result { + // We do not propagate `CARGO_UNSTABLE_BUILD_STD` since if `panic_abort` is not + // specified, the build of the runner will fail (since its profile specifies `panic=abort`). + // A proper fix could be to clear the whole environment before spawning this `cargo build`, + // but until `CargoBuild` exposes the `Command` or this function, we can only do this. let cargo = CargoBuild::new() .release() .target(target) .target_dir(&self.output_directory) .manifest_path(&self.manifest_path) + .env_remove("CARGO_UNSTABLE_BUILD_STD") .env("MULTIVERS_BUILDS_DESCRIPTION_PATH", builds_path); let cargo = cargo