File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -324,10 +324,12 @@ export class SessionManager implements Middleware {
324
324
private async migrateWhitespaceAroundPipeSetting ( ) {
325
325
const configuration = vscode . workspace . getConfiguration ( utils . PowerShellLanguageId ) ;
326
326
const deprecatedSetting = 'codeFormatting.whitespaceAroundPipe'
327
- if ( configuration . has ( deprecatedSetting ) && ! configuration . has ( 'codeFormatting.addWhitespaceAroundPipe' ) ) {
327
+ const newSetting = 'codeFormatting.addWhitespaceAroundPipe'
328
+ const configurationTargetOfNewSetting = await Settings . getEffectiveConfigurationTarget ( newSetting ) ;
329
+ if ( configuration . has ( deprecatedSetting ) && configurationTargetOfNewSetting === null ) {
328
330
const configurationTarget = await Settings . getEffectiveConfigurationTarget ( deprecatedSetting ) ;
329
331
const value = configuration . get ( deprecatedSetting , configurationTarget )
330
- await Settings . change ( 'codeFormatting.addWhitespaceAroundPipe' , value , configurationTarget ) ;
332
+ await Settings . change ( newSetting , value , configurationTarget ) ;
331
333
}
332
334
}
333
335
You can’t perform that action at this time.
0 commit comments