| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -80,9 +80,9 @@ def _add_dependencies( | |||
| 80 | 80 | lang_base.setup_cmd(prefix, ('cargo', 'add', *crates)) | |
| 81 | 81 | ||
| 82 | 82 | ||
| 83 | - def install_rust_with_toolchain(toolchain: str) -> None: | ||
| 83 | + def install_rust_with_toolchain(toolchain: str, envdir: str) -> None: | ||
| 84 | 84 | with tempfile.TemporaryDirectory() as rustup_dir: | |
| 85 | - with envcontext((('RUSTUP_HOME', rustup_dir),)): | ||
| 85 | + with envcontext((('CARGO_HOME', envdir), ('RUSTUP_HOME', rustup_dir))): | ||
| 86 | 86 | # acquire `rustup` if not present | |
| 87 | 87 | if parse_shebang.find_executable('rustup') is None: | |
| 88 | 88 | # We did not detect rustup and need to download it first. | |
@@ -145,7 +145,7 @@ def install_environment( | |||
| 145 | 145 | ctx.enter_context(in_env(prefix, version)) | |
| 146 | 146 | ||
| 147 | 147 | if version != 'system': | |
| 148 | - install_rust_with_toolchain(_rust_toolchain(version)) | ||
| 148 | + install_rust_with_toolchain(_rust_toolchain(version), envdir) | ||
| 149 | 149 | ||
| 150 | 150 | tmpdir = ctx.enter_context(tempfile.TemporaryDirectory()) | |
| 151 | 151 | ctx.enter_context(envcontext((('RUSTUP_HOME', tmpdir),))) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments