File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -460,15 +460,23 @@ function rewriteManifest(): Promise<void> {
460
460
"onFileSystem:cpptools-schema"
461
461
] ;
462
462
463
+ let doTouchExtension : boolean = false ;
464
+
463
465
const packageJsonPath : string = util . getExtensionFilePath ( "package.json" ) ;
464
466
if ( packageJsonPath . includes ( ".vscode-insiders" ) ||
465
467
packageJsonPath . includes ( ".vscode-server-insiders" ) ||
466
468
packageJsonPath . includes ( ".vscode-exploration" ) ||
467
469
packageJsonPath . includes ( ".vscode-server-exploration" ) ) {
468
470
if ( packageJson . contributes . configuration . properties [ 'C_Cpp.updateChannel' ] . default === 'Default' ) {
469
471
packageJson . contributes . configuration . properties [ 'C_Cpp.updateChannel' ] . default = 'Insiders' ;
472
+ doTouchExtension = true ;
470
473
}
471
474
}
472
475
473
- return util . writeFileText ( util . getPackageJsonPath ( ) , util . stringifyPackageJson ( packageJson ) ) ;
476
+ return util . writeFileText ( util . getPackageJsonPath ( ) , util . stringifyPackageJson ( packageJson ) ) . then ( ( ) => {
477
+ if ( doTouchExtension ) {
478
+ // This is required to prevent VS Code from using the cached version with the old updateChannel setting.
479
+ util . touchExtensionFolder ( ) ;
480
+ }
481
+ } ) ;
474
482
}
You can’t perform that action at this time.
0 commit comments