Skip to content

Commit

Permalink
building: dirtily fix call into cargo-config until feat stability
Browse files Browse the repository at this point in the history
Revert this issue when <rust-lang/cargo#9301> stabilizes.
  • Loading branch information
tmplt committed Jun 16, 2021
1 parent 7e2ac11 commit 2dc36f9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cargo-rtic-trace/src/building.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ pub struct CargoWrapper {
impl CargoWrapper {
/// Checks if cargo exists in PATH and returns it wrapped in a Command.
fn cmd() -> Result<Command> {
let cargo = env::var_os("CARGO").unwrap_or_else(|| "cargo".into());
// XXX cargo sets CARGO to an absolute
// ~/.rustup/toolchains/.../bin/cargo when starting a
// sub-command. Until
// <https://github.com/rust-lang/cargo/issues/9301> is
// stabilized, we need to call into +nightly for cargo-config.
// So for now we'll disregard it.
let cargo = "cargo"; // env::var_os("CARGO").unwrap_or_else(|| "cargo".into());
let mut cargo = Command::new(cargo);
let _output = cargo
.output()
Expand Down

0 comments on commit 2dc36f9

Please sign in to comment.