diff --git a/src/pythonManager.ts b/src/pythonManager.ts index 31d60924b..a1a68c3fa 100644 --- a/src/pythonManager.ts +++ b/src/pythonManager.ts @@ -358,7 +358,9 @@ export async function getUnixPythonList(workingDir: string) { ); if (pyVersionsStr) { const resultList = pyVersionsStr.trim().split("\n"); - return resultList; + const uniquePathsSet = new Set(resultList); + const uniquePathsArray = Array.from(uniquePathsSet); + return uniquePathsArray; } } catch (error) { Logger.errorNotify("Error looking for python in system", error); diff --git a/src/utils.ts b/src/utils.ts index b2a916b6e..b038fa9dc 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -246,8 +246,12 @@ export async function setCCppPropertiesJsonCompilerPath( let compilerRelativePath = compilerAbsolutePath.split( modifiedEnv.IDF_TOOLS_PATH )[1]; + const settingToUse = + process.platform === "win32" + ? "${config:idf.toolsPathWin}" + : "${config:idf.toolsPath}"; cCppPropertiesJson.configurations[0].compilerPath = - "${config:idf.toolsPath}" + compilerRelativePath; + settingToUse + compilerRelativePath; await writeJSON(cCppPropertiesJsonPath, cCppPropertiesJson, { spaces: vscode.workspace.getConfiguration().get("editor.tabSize") || 2, });