Skip to content

Commit

Permalink
Fix for issue #1092 (VSC-1257) (#1093)
Browse files Browse the repository at this point in the history
* Fix for issue #1092

* Fix for issue #1092
  • Loading branch information
dyarkovoy authored Dec 12, 2023
1 parent 0168990 commit 0299537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/idfToolsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ export class IdfToolsManager {
pathsToVerify: string,
logToChannel: boolean = true
) {
const pathNameInEnv: string =
process.platform === "win32" ? "Path" : "PATH";
const pathNameInEnv: string = Object.keys(process.env).find(
(k) => k.toUpperCase() == "PATH"
);
let modifiedPath = process.env[pathNameInEnv];
if (
process.env[pathNameInEnv] &&
Expand Down
9 changes: 3 additions & 6 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -978,12 +978,9 @@ export function appendIdfAndToolsToPath(curWorkspace: vscode.Uri) {
"partition_table"
)}`;

let pathNameInEnv: string;
if (process.platform === "win32") {
pathNameInEnv = "Path";
} else {
pathNameInEnv = "PATH";
}
let pathNameInEnv: string = Object.keys(process.env).find(
(k) => k.toUpperCase() == "PATH"
);
if (pathToGitDir) {
modifiedEnv[pathNameInEnv] =
pathToGitDir + path.delimiter + modifiedEnv[pathNameInEnv];
Expand Down

0 comments on commit 0299537

Please sign in to comment.