From 1ab5f8fd2dda112fb58c202f09b660772de90a26 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 14 Mar 2018 23:43:26 +0200 Subject: [PATCH 1/5] Skip inactive extensions when loading settings --- src/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 608b8fa..09f86d3 100644 --- a/src/main.js +++ b/src/main.js @@ -69,7 +69,11 @@ class PlatformIOVSCodeExtension { } loadEnterpriseSettings() { - const ext = vscode.extensions.all.find(item => item.id.startsWith('platformio.') && item.id !== 'platformio.platformio-ide'); + const ext = vscode.extensions.all.find(item => + item.id.startsWith('platformio.') + && item.id !== 'platformio.platformio-ide' + && item.isActive + ); if (!ext || !ext.exports || !ext.exports.hasOwnProperty('settings')) { return {}; } From 3648a05c2b981fe04de13e48407beeb3d0b4549d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 9 Apr 2018 10:25:00 -0700 Subject: [PATCH 2/5] Temporary workaround for urgent VSCode bug in v1.22 with a broken task runner for Windows OS // Resolve #97 --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/tasks.js | 12 +++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52da7c5..fb44faf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes +## 0.14.1 (2018-04-09) + +* Temporary workaround for urgent VSCode bug in v1.22 with a broken task runner for Windows OS (issue [#97](https://github.com/platformio/platformio-vscode-ide/issues/97)) + ## 0.14.0 (2018-03-14) * Intial support for PIO Enterprise diff --git a/package.json b/package.json index 686cf0d..848f817 100644 --- a/package.json +++ b/package.json @@ -230,7 +230,7 @@ "vscode:package": "babel src --out-dir lib && vsce package" }, "devDependencies": { - "@types/node": "^6.0.101", + "@types/node": "^7", "babel-cli": "^6.24.1", "babel-eslint": "^8.0.1", "babel-plugin-transform-class-properties": "^6.24.1", diff --git a/src/tasks.js b/src/tasks.js index 59208e2..79f42b8 100644 --- a/src/tasks.js +++ b/src/tasks.js @@ -251,6 +251,16 @@ class TaskCreator { } create() { + let pioCmd = 'platformio'; + if (IS_WINDOWS) { + pioCmd = 'platformio.exe'; + process.env.PATH.split(path.delimiter).forEach(item => { + if (fs.isFileSync(path.join(item, pioCmd))) { + pioCmd = path.join(item, pioCmd); + return; + } + }); + } const task = new vscode.Task( { type: PIOTasksProvider.title, @@ -258,7 +268,7 @@ class TaskCreator { }, this.name, PIOTasksProvider.title, - new vscode.ProcessExecution(IS_WINDOWS ? 'platformio.exe' : 'platformio', this._args, { + new vscode.ProcessExecution(pioCmd, this._args, { env: process.env }), '$platformio' From 01654671979011da05731034b91d77fec508c9ae Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 9 Apr 2018 15:46:34 -0700 Subject: [PATCH 3/5] Allow custom auto-run PIO Core commands --- package.json | 2 +- src/home.js | 2 +- src/installer/manager.js | 10 +++++++++- src/main.js | 15 +++++++++++++-- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 848f817..2f6ebd7 100644 --- a/package.json +++ b/package.json @@ -244,7 +244,7 @@ "dependencies": { "fs-plus": "^3.0.0", "ini": "^1.3.4", - "platformio-node-helpers": "^0.4.3" + "platformio-node-helpers": "^0.5.0" }, "extensionDependencies": [ "ms-vscode.cpptools", diff --git a/src/home.js b/src/home.js index b994a70..0366bcb 100644 --- a/src/home.js +++ b/src/home.js @@ -35,7 +35,7 @@ export class HomeContentProvider {