Skip to content

Commit

Permalink
check empty customExtraVars PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 committed Dec 26, 2024
1 parent 6bdf494 commit 800c6bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
23 changes: 15 additions & 8 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,14 +1119,21 @@ export async function appendIdfAndToolsToPath(curWorkspace: vscode.Uri) {
modifiedEnv[pathNameInEnv];
}

const extraPathsArray = customExtraVars[pathNameInEnv].split(path.delimiter);
for (let extraPath of extraPathsArray) {
if (
modifiedEnv[pathNameInEnv] &&
!modifiedEnv[pathNameInEnv].includes(extraPath)
) {
modifiedEnv[pathNameInEnv] =
extraPath + path.delimiter + modifiedEnv[pathNameInEnv];
if (
customExtraVars[pathNameInEnv] &&
customExtraVars[pathNameInEnv].length > 0
) {
const extraPathsArray = customExtraVars[pathNameInEnv].split(
path.delimiter
);
for (let extraPath of extraPathsArray) {
if (
modifiedEnv[pathNameInEnv] &&
!modifiedEnv[pathNameInEnv].includes(extraPath)
) {
modifiedEnv[pathNameInEnv] =
extraPath + path.delimiter + modifiedEnv[pathNameInEnv];
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions testFiles/testWorkspace/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"idf.espMdfPath": "/test/esp-mdf",
"idf.port": "/serialport",
"idf.openOcdConfigs": [
"board/esp32-wrover-kit-3.3v.cfg"
"board/esp32-wrover-kit-3.3v.cfg"
],
"idf.gitPath": "/usr/bin/git",
"files.simpleDialog.enable": true,
"window.dialogStyle": "custom",
"idf.notificationMode": "Output",
"idf.showOnboardingOnInit": false,
"idf.showOnboardingOnInit": false
}

0 comments on commit 800c6bd

Please sign in to comment.