Skip to content

Commit

Permalink
useIdfSetupSettings use idfSetup python if exist
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 committed Jan 17, 2025
1 parent a5f5a77 commit 08b00bd
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/setup/setupValidation/espIdfSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,32 @@ import { pathExists } from "fs-extra";
import { Logger } from "../../logger/logger";
import { checkPyVenv } from "./pythonEnv";
import { ConfigurationTarget, StatusBarItem, Uri } from "vscode";
import { getPythonEnvPath } from "../../pythonManager";
import {
getPythonEnvPath,
getSystemPythonFromSettings,
} from "../../pythonManager";

export async function useIdfSetupSettings(
setupConf: IdfSetup,
saveScope: ConfigurationTarget,
workspaceFolderUri: Uri,
espIdfStatusBar: StatusBarItem
) {
let sysPythonBinPath = "";
if (setupConf.python) {
sysPythonBinPath = await getSystemPythonFromSettings(
setupConf.python,
setupConf.idfPath,
setupConf.toolsPath
);
} else {
sysPythonBinPath = setupConf.sysPythonPath;
}
await saveSettings(
setupConf.idfPath,
setupConf.toolsPath,
setupConf.gitPath,
setupConf.sysPythonPath,
sysPythonBinPath,
saveScope,
workspaceFolderUri,
espIdfStatusBar,
Expand Down

0 comments on commit 08b00bd

Please sign in to comment.