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> {
460460 "onFileSystem:cpptools-schema"
461461 ] ;
462462
463+ let doTouchExtension : boolean = false ;
464+
463465 const packageJsonPath : string = util . getExtensionFilePath ( "package.json" ) ;
464466 if ( packageJsonPath . includes ( ".vscode-insiders" ) ||
465467 packageJsonPath . includes ( ".vscode-server-insiders" ) ||
466468 packageJsonPath . includes ( ".vscode-exploration" ) ||
467469 packageJsonPath . includes ( ".vscode-server-exploration" ) ) {
468470 if ( packageJson . contributes . configuration . properties [ 'C_Cpp.updateChannel' ] . default === 'Default' ) {
469471 packageJson . contributes . configuration . properties [ 'C_Cpp.updateChannel' ] . default = 'Insiders' ;
472+ doTouchExtension = true ;
470473 }
471474 }
472475
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+ } ) ;
474482}
You can’t perform that action at this time.
0 commit comments