Skip to content

Commit

Permalink
Simplify and persist PowerShell session configuration changes
Browse files Browse the repository at this point in the history
This change improves our session menu so that when the user selects a
different PowerShell version the choice is persisted in their user
settings.  The previous code for managing session configurations has
been mostly removed because it was unnecessarily complex.

We've also added a new "powershell.powerShellExePath" setting to replace
the now deprecated "powershell.developer.powerShellExePath" setting
since this is now a user-level setting.  If a user has the deprecated
setting in their configuration file, we will notify them and fix it
automatically if they wish.
  • Loading branch information
daviwil committed Jun 14, 2017
1 parent 3ca6d4b commit 8ca5548
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 172 deletions.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@
"type": "object",
"title": "PowerShell Configuration",
"properties": {
"powershell.powerShellExePath": {
"type": "string",
"default": "",
"isExecutable": true,
"description": "Specifies the full path to a PowerShell executable. Changes the installation of PowerShell used for language and debugging services."
},
"powershell.startAutomatically": {
"type": "boolean",
"default": true,
Expand Down Expand Up @@ -384,7 +390,8 @@
"powershell.developer.powerShellExePath": {
"type": "string",
"default": "",
"description": "Specifies the full path to a PowerShell executable. Changes the installation of PowerShell used for language and debugging services."
"isExecutable": true,
"description": "Deprecated. Please use the 'powershell.powerShellExePath' setting instead"
},
"powershell.developer.powerShellExeIsWindowsDevBuild": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function activate(context: vscode.ExtensionContext): void {

sessionManager.setExtensionFeatures(extensionFeatures);

var extensionSettings = Settings.load(utils.PowerShellLanguageId);
var extensionSettings = Settings.load();
if (extensionSettings.startAutomatically) {
sessionManager.start();
}
Expand Down
Loading

0 comments on commit 8ca5548

Please sign in to comment.