Source cargo env before using rustup in install step
GITHUB_PATH only takes effect in subsequent steps, but rustup/rustc/cargo are called within the same step. Adding `. "$HOME/.cargo/env"` immediately after install puts cargo/rustup in PATH for the remainder of the step. Fixed in both Linux and macOS jobs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,7 @@ jobs:
|
|||||||
else
|
else
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||||
fi
|
fi
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
rustc --version
|
rustc --version
|
||||||
cargo --version
|
cargo --version
|
||||||
@@ -176,6 +177,7 @@ jobs:
|
|||||||
else
|
else
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||||
fi
|
fi
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
rustup target add aarch64-apple-darwin x86_64-apple-darwin
|
rustup target add aarch64-apple-darwin x86_64-apple-darwin
|
||||||
rustc --version
|
rustc --version
|
||||||
|
|||||||
Reference in New Issue
Block a user