159
160
private async _writeToFile(): Promise<boolean> {
162
>
pluginUri: e.pluginUri.toString(),
163
>
marketplace: e.marketplace,
164
>
...(e.name ? { name: e.name } : {}),
165
>
}));
166
>
167
>
const data: IInstalledJson = {
168
>
version: INSTALLED_JSON_VERSION,
169
>
installed: entries,
170
>
};
171
>
172
>
try {
173
>
this._suppressFileWatch = true;
174
>
const content = JSON.stringify(data, undefined, '\t');
175
>
await this._fileService.createFolder(this._agentPluginsHome);
176
>
await this._fileService.writeFile(this._fileUri, VSBuffer.fromString(content));
177
return true;
179
this._logService.error('[FileBackedInstalledPluginsStore] Failed to write installed.json', error);
180
return false;
182
>
this._suppressFileWatch = false;
183
>
}
184
>
}
185
186
// --- File watching ------------------------------------------------------------