diff --git a/CHANGELOG.md b/CHANGELOG.md index ed385b7..9d5577a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes +## 1.8.2 (2019-08-11) + +- Show multi-environment tasks when more than one project `env` is declared +- Temporary workaround for the broken Tasks API in the latest VSCode 1.37 (issue [#957](https://github.com/platformio/platformio-vscode-ide/issues/957)) + ## 1.8.1 (2019-07-23) - Added new command "Open PlatformIO Core CLI" diff --git a/package.json b/package.json index fbc62fb..686fc93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "platformio-ide", - "version": "1.8.1", + "version": "1.8.2", "publisher": "platformio", "engines": { "vscode": "^1.24.0" @@ -604,7 +604,7 @@ }, "dependencies": { "fs-plus": "^3.1.1", - "platformio-node-helpers": "^5.0.2", + "platformio-node-helpers": "^5.0.3", "platformio-vscode-debug": "^1.2.8" }, "extensionDependencies": [ diff --git a/src/home.js b/src/home.js index b87b8e1..f25e2f2 100644 --- a/src/home.js +++ b/src/home.js @@ -32,7 +32,7 @@ export default class PIOHome { try { if (this._currentPanel) { if (this._lastStartUrl !== startUrl) { - this._currentPanel.webview.html = await this.getWebviewContent(startUrl);; + this._currentPanel.webview.html = await this.getWebviewContent(startUrl); } return this._currentPanel.reveal(column); } diff --git a/src/main.js b/src/main.js index 3a73a39..05e3fd8 100644 --- a/src/main.js +++ b/src/main.js @@ -112,20 +112,17 @@ class PlatformIOVSCodeExtension { && item.id !== 'platformio.platformio-ide' && item.isActive ); - if (!ext || !ext.exports || !ext.exports.hasOwnProperty('settings')) { - return; - } - return ext.exports.settings; + return (ext && ext.exports) ? ext.exports.settings : undefined; } getEnterpriseSetting(id, defaultValue = undefined) { if (!this._enterpriseSettings) { this._enterpriseSettings = this.loadEnterpriseSettings(); } - if (!this._enterpriseSettings || !this._enterpriseSettings.hasOwnProperty(id)) { - return defaultValue; + if (this._enterpriseSettings && id in this._enterpriseSettings) { + return this._enterpriseSettings[id]; } - return this._enterpriseSettings[id]; + return defaultValue; } patchOSEnviron() { diff --git a/src/state-storage.js b/src/state-storage.js index 2faa8ba..e1bada5 100644 --- a/src/state-storage.js +++ b/src/state-storage.js @@ -23,11 +23,7 @@ export default class StateStorage { } getValue(key) { - const data = this._loadState(); - if (data && data.hasOwnProperty(key)) { - return data[key]; - } - return undefined; + return (this._loadState() || {})[key]; } setValue(key, value) { diff --git a/src/tasks.js b/src/tasks.js index d556c0e..4673be6 100644 --- a/src/tasks.js +++ b/src/tasks.js @@ -65,7 +65,7 @@ export default class TaskManager { vscode.workspace.getWorkspaceFolder(vscode.Uri.file(this._projectDir)), projectTask.title, TaskManager.type, - new vscode.ProcessExecution(IS_WINDOWS ? 'platformio.exe' : 'platformio', projectTask.args, { + new vscode.ShellExecution(IS_WINDOWS ? 'platformio.exe' : 'platformio', projectTask.args, { cwd: this._projectDir, env: process.env }),