Skip to content

Commit 8ca5548

Browse files
committed
Simplify and persist PowerShell session configuration changes
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.
1 parent 3ca6d4b commit 8ca5548

File tree

4 files changed

+170
-172
lines changed

4 files changed

+170
-172
lines changed

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@
351351
"type": "object",
352352
"title": "PowerShell Configuration",
353353
"properties": {
354+
"powershell.powerShellExePath": {
355+
"type": "string",
356+
"default": "",
357+
"isExecutable": true,
358+
"description": "Specifies the full path to a PowerShell executable. Changes the installation of PowerShell used for language and debugging services."
359+
},
354360
"powershell.startAutomatically": {
355361
"type": "boolean",
356362
"default": true,
@@ -384,7 +390,8 @@
384390
"powershell.developer.powerShellExePath": {
385391
"type": "string",
386392
"default": "",
387-
"description": "Specifies the full path to a PowerShell executable. Changes the installation of PowerShell used for language and debugging services."
393+
"isExecutable": true,
394+
"description": "Deprecated. Please use the 'powershell.powerShellExePath' setting instead"
388395
},
389396
"powershell.developer.powerShellExeIsWindowsDevBuild": {
390397
"type": "boolean",

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export function activate(context: vscode.ExtensionContext): void {
126126

127127
sessionManager.setExtensionFeatures(extensionFeatures);
128128

129-
var extensionSettings = Settings.load(utils.PowerShellLanguageId);
129+
var extensionSettings = Settings.load();
130130
if (extensionSettings.startAutomatically) {
131131
sessionManager.start();
132132
}

0 commit comments

Comments
 (0)