Skip to content

Commit f559c10

Browse files
committed
Auto merge of #9843 - ehuss:fix-test-cargo-env, r=alexcrichton
Fix test not to rely on `cargo` in PATH. This fixes a test that was trying to execute `cargo` from PATH. This test doesn't work on rust-lang/rust where the rustup installation is removed, and thus there is no `cargo` in PATH.
2 parents 77a0379 + e0bd187 commit f559c10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/testsuite/fix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ fn fix_with_run_cargo_in_proc_macros() {
17191719
17201720
#[proc_macro]
17211721
pub fn foo(_input: TokenStream) -> TokenStream {
1722-
let output = std::process::Command::new("cargo")
1722+
let output = std::process::Command::new(env!("CARGO"))
17231723
.args(&["metadata", "--format-version=1"])
17241724
.output()
17251725
.unwrap();

0 commit comments

Comments
 (0)