Skip to content

Commit adb0d56

Browse files
committed
Update to the latest platformio-node-helpers
1 parent 577e521 commit adb0d56

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
- Added a new setting ``platformio-ide.activateProjectOnTextEditorChange`` to enable automatic project activation depending on an active opened text editor (issue [#2410](https://github.com/platformio/platformio-vscode-ide/issues/2410))
77
- Automatically activate project environment opened via "PIO Home > New Project / Open Project" (issue [#2414](https://github.com/platformio/platformio-vscode-ide/issues/2414))
88
- Do not show "Default" environment when a project does not have any build environments (issue [#2450](https://github.com/platformio/platformio-vscode-ide/issues/2450))
9+
- PlatformIO IDE Installer
10+
* Updated PlatformIO Core installer to v1.0.1
11+
* Rebuild project index only when the environment changes
12+
* Fixed an issue "The 'path' argument must be of type string. Received undefined"
913

1014
## 2.3.0 (2021-03-03)
1115

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@
633633
},
634634
"dependencies": {
635635
"fs-plus": "~3.1.1",
636-
"platformio-node-helpers": "~9.1.1",
636+
"platformio-node-helpers": "~9.1.2",
637637
"platformio-vscode-debug": "~1.3.0"
638638
},
639639
"extensionDependencies": [

src/installer/python-prompt.js

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export default class PythonPrompt {
2323
{ title: 'Abort PlatformIO IDE Installation', isCloseAffordance: true }
2424
);
2525

26+
let result = { status: this.STATUS_TRY_AGAIN };
27+
let pythonExecutable = undefined;
2628
switch (selectedItem ? selectedItem.title : undefined) {
2729
case 'Install Python':
2830
vscode.commands.executeCommand(
@@ -31,21 +33,26 @@ export default class PythonPrompt {
3133
'http://docs.platformio.org/page/faq.html#install-python-interpreter'
3234
)
3335
);
34-
return { status: this.STATUS_TRY_AGAIN };
36+
break;
3537
case 'I have Python':
36-
return {
37-
status: this.STATUS_CUSTOMEXE,
38-
pythonExecutable: await vscode.window.showInputBox({
39-
prompt: 'Please specify a full path to Python executable file',
40-
placeHolder: 'Full path to python/python.exe',
41-
validateInput: (value) =>
42-
!fs.isFileSync(value) ? 'Invalid path to Python Interpreter' : null,
43-
}),
44-
};
38+
pythonExecutable = await vscode.window.showInputBox({
39+
prompt: 'Please specify a full path to Python executable file',
40+
placeHolder: 'Full path to python/python.exe',
41+
validateInput: (value) =>
42+
!fs.isFileSync(value) ? 'Invalid path to Python Interpreter' : null,
43+
});
44+
if (pythonExecutable) {
45+
result = {
46+
status: this.STATUS_CUSTOMEXE,
47+
pythonExecutable,
48+
};
49+
}
50+
break;
4551
case 'Abort PlatformIO IDE Installation':
46-
return { status: this.STATUS_ABORT };
47-
default:
48-
return { status: this.STATUS_TRY_AGAIN };
52+
result = { status: this.STATUS_ABORT };
53+
break;
4954
}
55+
56+
return result;
5057
}
5158
}

0 commit comments

Comments
 (0)