Skip to content

Commit

Permalink
Merge branch 'release/v1.8.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Aug 11, 2019
2 parents aaa22dc + b197547 commit fd115f4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "platformio-ide",
"version": "1.8.1",
"version": "1.8.2",
"publisher": "platformio",
"engines": {
"vscode": "^1.24.0"
Expand Down Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion src/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
11 changes: 4 additions & 7 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 1 addition & 5 deletions src/state-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}),
Expand Down

0 comments on commit fd115f4

Please sign in to comment.