File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -80,9 +80,9 @@ def _add_dependencies(
8080 lang_base .setup_cmd (prefix , ('cargo' , 'add' , * crates ))
8181
8282
83- def install_rust_with_toolchain (toolchain : str ) -> None :
83+ def install_rust_with_toolchain (toolchain : str , envdir : str ) -> None :
8484 with tempfile .TemporaryDirectory () as rustup_dir :
85- with envcontext ((('RUSTUP_HOME' , rustup_dir ), )):
85+ with envcontext ((('CARGO_HOME' , envdir ), ( ' RUSTUP_HOME' , rustup_dir ))):
8686 # acquire `rustup` if not present
8787 if parse_shebang .find_executable ('rustup' ) is None :
8888 # We did not detect rustup and need to download it first.
@@ -145,7 +145,7 @@ def install_environment(
145145 ctx .enter_context (in_env (prefix , version ))
146146
147147 if version != 'system' :
148- install_rust_with_toolchain (_rust_toolchain (version ))
148+ install_rust_with_toolchain (_rust_toolchain (version ), envdir )
149149
150150 tmpdir = ctx .enter_context (tempfile .TemporaryDirectory ())
151151 ctx .enter_context (envcontext ((('RUSTUP_HOME' , tmpdir ),)))
You can’t perform that action at this time.
0 commit comments