mirror of
https://github.com/rust-lang/cargo
synced 2024-08-28 11:50:23 +00:00
Add workaround for RUSTUP_WINDOWS_PATH_ADD_BIN.
On Windows, rustup has an issue with recursive cargo invocations. This commit can be removed once https://github.com/rust-lang/rustup/issues/3036 is resolved.
This commit is contained in:
parent
9f71231391
commit
ccaa118d27
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
|
@ -116,6 +116,8 @@ jobs:
|
|||
CARGO_PROFILE_TEST_DEBUG: 1
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_PUBLIC_NETWORK_TESTS: 1
|
||||
# Workaround for https://github.com/rust-lang/rustup/issues/3036
|
||||
RUSTUP_WINDOWS_PATH_ADD_BIN: 0
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
@ -170,7 +172,6 @@ jobs:
|
|||
- name: Configure extra test environment
|
||||
run: echo CARGO_CONTAINER_TESTS=1 >> $GITHUB_ENV
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
|
||||
- run: cargo test -p cargo
|
||||
- name: Clear intermediate test output
|
||||
run: ci/clean-test-output.sh
|
||||
|
|
|
@ -248,6 +248,13 @@ fn has_rustup_stable() -> bool {
|
|||
// This cannot run on rust-lang/rust CI due to the lack of rustup.
|
||||
return false;
|
||||
}
|
||||
if cfg!(windows) && !is_ci() && option_env!("RUSTUP_WINDOWS_PATH_ADD_BIN").is_none() {
|
||||
// There is an issue with rustup that doesn't allow recursive cargo
|
||||
// invocations. Disable this on developer machines if the environment
|
||||
// variable is not enabled. This can be removed once
|
||||
// https://github.com/rust-lang/rustup/issues/3036 is resolved.
|
||||
return false;
|
||||
}
|
||||
check_command("cargo", &["+stable", "--version"])
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue