Skip to content

Commit

Permalink
Merge branch 'release/v0.16.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jun 26, 2018
2 parents 4cc8512 + ed2f26f commit ff837ee
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release Notes

## 0.16.2 (2018-06-26)

* Handle PIO Home server errors
* Install `virtualenv` to the global scope if possible
* Skip Python interpreter from MinGW

## 0.16.1 (2018-06-21)

* Fixed an issue with infinite PIO Core installation
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": "0.16.1",
"version": "0.16.2",
"publisher": "platformio",
"engines": {
"vscode": "^1.24.0"
Expand Down Expand Up @@ -548,7 +548,7 @@
"dependencies": {
"fs-plus": "^3.0.0",
"ini": "^1.3.4",
"platformio-node-helpers": "^0.6.1",
"platformio-node-helpers": "^2.0.0",
"platformio-vscode-debug": "^1.0.0",
"querystringify": "*"
},
Expand Down
34 changes: 8 additions & 26 deletions src/installer/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import * as pioNodeHelpers from 'platformio-node-helpers';
import { PIO_CORE_MIN_VERSION } from '../constants';
import PythonPrompt from './python-prompt';
import StateStorage from './state-storage';
import { extension } from '../main';
import vscode from 'vscode';


Expand All @@ -26,35 +25,18 @@ export default class InstallationManager {
this.stateStorage = new StateStorage(globalState, this.STORAGE_STATE_KEY);

const config = vscode.workspace.getConfiguration('platformio-ide');
const defaultParams = {
pioCoreMinVersion: PIO_CORE_MIN_VERSION,
useBuiltinPIOCore: config.get('useBuiltinPIOCore'),
setUseBuiltinPIOCore: (value) => config.update('platformio-ide.useBuiltinPIOCore', value),
useDevelopmentPIOCore: config.get('useDevelopmentPIOCore'),
pythonPrompt: new PythonPrompt()
};
this.stages = [
new pioNodeHelpers.installer.PlatformIOCoreStage(
this.stateStorage,
this.onDidStatusChange.bind(this),
new Proxy(defaultParams, {
get: (obj, prop) => {
if (prop in obj) {
return obj[prop];
}
// wait a while when enterprise settings will be loaded
else if (prop === 'autorunPIOCmds') {
return [
{
args: ['home', '--host', '__do_not_start__'],
when: 'post-install',
suppressError: true
}
].concat(extension.getEnterpriseSetting('autorunPIOCoreCmds', []));
}
return undefined;
}
})),
{
pioCoreMinVersion: PIO_CORE_MIN_VERSION,
useBuiltinPIOCore: config.get('useBuiltinPIOCore'),
setUseBuiltinPIOCore: (value) => config.update('platformio-ide.useBuiltinPIOCore', value),
useDevelopmentPIOCore: config.get('useDevelopmentPIOCore'),
pythonPrompt: new PythonPrompt()
}
)
];
}

Expand Down
7 changes: 6 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ class PlatformIOVSCodeExtension {
});

await this.startInstaller();

if (typeof this.getEnterpriseSetting('onPIOCoreReady') === 'function') {
await this.getEnterpriseSetting('onPIOCoreReady')();
}

this.registerCommands();

if (!hasPIOProject) {
Expand Down Expand Up @@ -161,7 +166,7 @@ class PlatformIOVSCodeExtension {
try {
await pioNodeHelpers.home.ensureServerStarted();
} catch (err) {
notifyError('Start PIO Home Server', err);
return notifyError('Start PIO Home Server', err);
}
vscode.commands.executeCommand('platformio-ide.showHome');
}
Expand Down

0 comments on commit ff837ee

Please sign in to comment.