Skip to content

Commit 6cc7eea

Browse files
author
Rachel Macfarlane
committed
Ensure list of language ids gets populated when calling getLanguageIds before extension install/uninstall
1 parent bf5e12e commit 6cc7eea

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/vs/platform/localizations/node/localizations.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class LanguagePacksCache extends Disposable {
9393
private languagePacks: { [language: string]: ILanguagePack } = {};
9494
private languagePacksFilePath: string;
9595
private languagePacksFileLimiter: Queue<any>;
96+
private initializedCache: boolean;
9697

9798
constructor(
9899
@IEnvironmentService environmentService: IEnvironmentService,
@@ -105,7 +106,7 @@ class LanguagePacksCache extends Disposable {
105106

106107
getLanguagePacks(): Promise<{ [language: string]: ILanguagePack }> {
107108
// if queue is not empty, fetch from disk
108-
if (this.languagePacksFileLimiter.size) {
109+
if (this.languagePacksFileLimiter.size || !this.initializedCache) {
109110
return this.withLanguagePacks()
110111
.then(() => this.languagePacks);
111112
}
@@ -175,6 +176,7 @@ class LanguagePacksCache extends Disposable {
175176
}
176177
}
177178
this.languagePacks = languagePacks;
179+
this.initializedCache = true;
178180
const raw = JSON.stringify(this.languagePacks);
179181
this.logService.debug('Writing language packs', raw);
180182
return pfs.writeFile(this.languagePacksFilePath, raw);

0 commit comments

Comments
 (0)