@@ -313,17 +313,6 @@ function createDefaultArgvConfigSync(argvConfigPath) {
313313 fs . mkdirSync ( argvConfigPathDirname ) ;
314314 }
315315
316- // Migrate over legacy locale
317- const localeConfigPath = path . join ( userDataPath , 'User' , 'locale.json' ) ;
318- const legacyLocale = getLegacyUserDefinedLocaleSync ( localeConfigPath ) ;
319- if ( legacyLocale ) {
320- try {
321- fs . unlinkSync ( localeConfigPath ) ;
322- } catch ( error ) {
323- //ignore
324- }
325- }
326-
327316 // Default argv content
328317 const defaultArgvConfigContent = [
329318 '// This configuration file allows you to pass permanent command line arguments to VS Code.' ,
@@ -340,19 +329,10 @@ function createDefaultArgvConfigSync(argvConfigPath) {
340329 '' ,
341330 ' // Enabled by default by VS Code to resolve color issues in the renderer' ,
342331 ' // See https://github.com/Microsoft/vscode/issues/51791 for details' ,
343- ' "disable-color-correct-rendering": true'
332+ ' "disable-color-correct-rendering": true' ,
333+ '}'
344334 ] ;
345335
346- if ( legacyLocale ) {
347- defaultArgvConfigContent [ defaultArgvConfigContent . length - 1 ] = `${ defaultArgvConfigContent [ defaultArgvConfigContent . length - 1 ] } ,` ; // append trailing ","
348-
349- defaultArgvConfigContent . push ( '' ) ;
350- defaultArgvConfigContent . push ( ' // Display language of VS Code' ) ;
351- defaultArgvConfigContent . push ( ` "locale": "${ legacyLocale } "` ) ;
352- }
353-
354- defaultArgvConfigContent . push ( '}' ) ;
355-
356336 // Create initial argv.json with default content
357337 fs . writeFileSync ( argvConfigPath , defaultArgvConfigContent . join ( '\n' ) ) ;
358338 } catch ( error ) {
@@ -610,19 +590,4 @@ function getUserDefinedLocale(argvConfig) {
610590 return argvConfig . locale && typeof argvConfig . locale === 'string' ? argvConfig . locale . toLowerCase ( ) : undefined ;
611591}
612592
613- /**
614- * @param {string } localeConfigPath
615- * @returns {string | undefined }
616- */
617- function getLegacyUserDefinedLocaleSync ( localeConfigPath ) {
618- try {
619- const content = stripComments ( fs . readFileSync ( localeConfigPath ) . toString ( ) ) ;
620-
621- const value = JSON . parse ( content ) . locale ;
622- return value && typeof value === 'string' ? value . toLowerCase ( ) : undefined ;
623- } catch ( error ) {
624- // ignore
625- }
626- }
627-
628593//#endregion
0 commit comments