mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-util/rustup: use system toolchain and ignore rust-toolchain.toml
Rustup reads rust-toolchain.toml if present in $(pwd) which may cause undesired behavior. Change to a temp dir bevor executing rustup to prevent this behavior. [sam: Revbump to propagate the fix.] Closes: https://bugs.gentoo.org/965147 Signed-off-by: Pepper Gray <hello@peppergray.xyz> Part-of: https://github.com/gentoo/gentoo/pull/44341 Closes: https://github.com/gentoo/gentoo/pull/44341 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -88,11 +88,14 @@ symlink_rustup() {
|
||||
fi
|
||||
done
|
||||
|
||||
# prevent reading rust-toolchain.toml from $(pwd)
|
||||
pushd $(mktemp -d) > /dev/null
|
||||
good "Setting gentoo ${gentoo_rust// /} as default toolchain"
|
||||
[[ ${QUIET+set} != set ]] && "${CARGO_HOME}/bin/rustup" -V
|
||||
"${CARGO_HOME}/bin/rustup" ${QUIET--v} toolchain link gentoo "/usr"
|
||||
"${CARGO_HOME}/bin/rustup" ${QUIET--v} default gentoo
|
||||
[[ ${QUIET+set} != set ]] && "${CARGO_HOME}/bin/rustup" show
|
||||
popd > /dev/null
|
||||
|
||||
good "Prepend ${CARGO_HOME}/bin to your PATH to use rustup"
|
||||
good "rustup selfupdate is disabled, it will be updated by portage"
|
||||
|
||||
Reference in New Issue
Block a user