Skip to content

Commit 4684237

Browse files
authored
Merge pull request #46 from ilmari/cargo-home
Respect CARGO_HOME environment variable
2 parents 431cfdd + 4bf724f commit 4684237

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ class RustPlugin {
5151
}
5252

5353
runDocker(funcArgs, cargoPackage, binary) {
54-
const home = homedir();
55-
const cargoRegistry = path.join(home, ".cargo/registry");
56-
const cargoDownloads = path.join(home, ".cargo/git");
54+
const cargoHome = process.env.CARGO_HOME || (path.join(homedir(), ".cargo"));
55+
const cargoRegistry = path.join(cargoHome, "registry");
56+
const cargoDownloads = path.join(cargoHome, "git");
5757
const defaultArgs = [
5858
'run',
5959
'--rm',

0 commit comments

Comments
 (0)