Skip to content

Commit 7c22138

Browse files
committed
rust: Don't pass toolchain around using env variables
1 parent c81a7e2 commit 7c22138

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre_commit/languages/rust.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def install_environment(
174174
packages_to_install.add((package,))
175175

176176
with in_env(prefix, version):
177-
toolchain = os.getenv('RUSTUP_TOOLCHAIN')
177+
toolchain = TOOLCHAIN_FROM_VERSION.get(version, version)
178178
if toolchain is not None:
179179
install_rust_with_toolchain(toolchain)
180180

0 commit comments

Comments
 (0)