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 78
78
// Do nothing. If we can't read the file we have no
79
79
// language pack config.
80
80
}
81
- } , err => {
82
- if ( err . code === 'ENOENT' ) {
83
- return undefined ;
84
- }
85
- throw err ;
86
- } ) ;
87
81
}
88
82
89
83
function readFile ( file ) {
121
115
* @returns {object }
122
116
*/
123
117
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 ;
133
129
}
134
130
135
131
/**
Original file line number Diff line number Diff line change @@ -24,12 +24,9 @@ import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
24
24
import Severity from 'vs/base/common/severity' ;
25
25
import { canceled } from 'vs/base/common/errors' ;
26
26
import { IUserDataAutoSyncEnablementService , IUserDataSyncResourceEnablementService , SyncResource } from 'vs/platform/userDataSync/common/userDataSync' ;
27
- < < < << << HEAD
28
27
import { isWeb } from 'vs/base/common/platform' ;
29
- === === =
30
28
import { Promises } from 'vs/base/common/async' ;
31
29
import { IWorkspaceTrustService , WorkspaceTrustState } from 'vs/platform/workspace/common/workspaceTrust' ;
32
- >>> >>> > e8cd17a97d8c58fffcbac05394b3ee2b3c72d384
33
30
34
31
export class ExtensionManagementService extends Disposable implements IWorkbenchExtensioManagementService {
35
32
@@ -263,13 +260,7 @@ export class ExtensionManagementService extends Disposable implements IWorkbench
263
260
264
261
// Install Language pack on local and remote servers
265
262
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
- === = ===
271
263
servers . push ( ...this . servers . filter ( server => server !== this . extensionManagementServerService . webExtensionManagementServer ) ) ;
272
- >>> > >>> e8cd17a97d8c58fffcbac05394b3ee2b3c72d384
273
264
} else {
274
265
const server = this . getExtensionManagementServerToInstall ( manifest ) ;
275
266
if ( server ) {
You can’t perform that action at this time.
0 commit comments