if customPython:
settings += f''',
- "raspberry-pi-pico.python3Path": "{sys.executable.replace(user_home, "${HOME}") if use_home_var else sys.executable}"'''
+ "raspberry-pi-pico.python3Path": "{sys.executable.replace("\\", "/").replace(user_home, "${HOME}") if use_home_var else sys.executable}"'''
settings += '\n}\n'
export async function downloadAndInstallSDK(
version: string,
repositoryUrl: string,
- settings: Settings
+ settings: Settings,
+ python3Path?: string
): Promise<boolean> {
let gitExecutable: string | undefined =
settings
gitExecutable
))
) {
+ settings.reload();
// check python requirements
const python3Exe: string =
+ python3Path ||
settings
.getString(SettingsKey.python3Path)
?.replace(HOME_VAR, homedir().replaceAll("\\", "/")) ||
!(await downloadAndInstallSDK(
selectedSDK,
SDK_REPOSITORY_URL,
- this._settings
+ this._settings,
+ // python3Path is only possible undefined if downloaded and there is already checked and returned if this happened
+ python3Path!.replace(HOME_VAR, homedir().replaceAll("\\", "/"))
)) ||
!(await downloadAndInstallToolchain(selectedToolchain))
) {