File tree Expand file tree Collapse file tree 2 files changed +11
-24
lines changed
workbench/services/extensionManagement/common Expand file tree Collapse file tree 2 files changed +11
-24
lines changed Original file line number Diff line number Diff line change 7878 // Do nothing. If we can't read the file we have no
7979 // language pack config.
8080 }
81- } , err => {
82- if ( err . code === 'ENOENT' ) {
83- return undefined ;
84- }
85- throw err ;
86- } ) ;
8781 }
8882
8983 function readFile ( file ) {
121115 * @returns {object }
122116 */
123117 function getLanguagePackConfigurations ( userDataPath ) {
124- const configFile = path . join ( userDataPath , 'languagepacks.json' ) ;
125- try {
126- // NOTE@coder : Swapped require with readFile since require is cached and
127- // we don't restart the server-side portion of code-server when the
128- // language changes.
129- return JSON . parse ( fs . readFileSync ( configFile , 'utf8' ) ) ;
130- } catch ( err ) {
131- // Do nothing. If we can't read the file we have no
132- // language pack config.
118+ const configFile = path . join ( userDataPath , 'languagepacks.json' ) ;
119+ try {
120+ // NOTE@coder : Swapped require with readFile since require is cached and
121+ // we don't restart the server-side portion of code-server when the
122+ // language changes.
123+ return JSON . parse ( fs . readFileSync ( configFile , 'utf8' ) ) ;
124+ } catch ( err ) {
125+ // Do nothing. If we can't read the file we have no
126+ // language pack config.
127+ }
128+ return undefined ;
133129 }
134130
135131 /**
Original file line number Diff line number Diff line change @@ -24,12 +24,9 @@ import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
2424import Severity from 'vs/base/common/severity' ;
2525import { canceled } from 'vs/base/common/errors' ;
2626import { IUserDataAutoSyncEnablementService , IUserDataSyncResourceEnablementService , SyncResource } from 'vs/platform/userDataSync/common/userDataSync' ;
27- < < < << << HEAD
2827import { isWeb } from 'vs/base/common/platform' ;
29- === === =
3028import { Promises } from 'vs/base/common/async' ;
3129import { IWorkspaceTrustService , WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust' ;
32- >>> >>> > e8cd17a97d8c58fffcbac05394b3ee2b3c72d384
3330
3431export class ExtensionManagementService extends Disposable implements IWorkbenchExtensioManagementService {
3532
@@ -263,13 +260,7 @@ export class ExtensionManagementService extends Disposable implements IWorkbench
263260
264261 // Install Language pack on local and remote servers
265262 if ( isLanguagePackExtension ( manifest ) ) {
266- < < < << << HEAD
267- // NOTE@coder : It does not appear language packs can be installed on the web
268- // extension management server at this time. Filter out the web to fix this.
269- servers . push ( ...this . servers . filter ( s => s !== this . extensionManagementServerService . webExtensionManagementServer ) ) ;
270- === = ===
271263 servers . push ( ...this . servers . filter ( server => server !== this . extensionManagementServerService . webExtensionManagementServer ) ) ;
272- >>> > >>> e8cd17a97d8c58fffcbac05394b3ee2b3c72d384
273264 } else {
274265 const server = this . getExtensionManagementServerToInstall ( manifest ) ;
275266 if ( server ) {
You can’t perform that action at this time.
0 commit comments