Skip to content

Commit

Permalink
fix: set path env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Nov 2, 2022
1 parent d49905e commit 8a2ae4d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/simpleGit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ export class SimpleGit extends GitManager {
config: ["core.quotepath=off"]
});
const env = this.plugin.localStorage.getPATHPaths();
if (env) {
this.git.env("PATH", process.env["PATH"] + ":" + env.join(":"));
if (env.length > 0) {
const path = process.env["PATH"] + ":" + env.join(":");
process.env["PATH"] = path;
}
this.git.cwd(await this.git.revparse("--show-toplevel"));
await this.git.cwd(await this.git.revparse("--show-toplevel"));

}
}

Expand Down

0 comments on commit 8a2ae4d

Please sign in to comment.