pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pre-commit/pre-commit/commit/2700a7d62241d7bea52d5305b5bca88ad7072919

="https://github.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> set RUSTUP_HOME when using a non-system rust · pre-commit/pre-commit@2700a7d · GitHub
Skip to content

Commit 2700a7d

Browse files
committed
set RUSTUP_HOME when using a non-system rust
1 parent 294590f commit 2700a7d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pre_commit/languages/rust.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,15 @@ def install_environment(
142142
else:
143143
packages_to_install.add((package,))
144144

145-
with in_env(prefix, version):
145+
with contextlib.ExitStack() as ctx:
146+
ctx.enter_context(in_env(prefix, version))
147+
146148
if version != 'system':
147149
install_rust_with_toolchain(_rust_toolchain(version))
148150

151+
tmpdir = ctx.enter_context(tempfile.TemporaryDirectory())
152+
ctx.enter_context(envcontext((('RUSTUP_HOME', tmpdir),)))
153+
149154
if len(lib_deps) > 0:
150155
_add_dependencies(prefix, lib_deps)
151156

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy