Refactor vscode endpoints to use fork directly.

This commit is contained in:
Teffen Ellis
2021-09-29 23:14:56 -04:00
committed by Teffen
parent beebf53adc
commit d8c344beda
52 changed files with 502 additions and 3406 deletions

View File

@@ -20,7 +20,7 @@ export class SettingsProvider<T> {
try {
const raw = (await fs.readFile(this.settingsPath, "utf8")).trim()
return raw ? JSON.parse(raw) : {}
} catch (error) {
} catch (error: any) {
if (error.code !== "ENOENT") {
logger.warn(error.message)
}
@@ -37,7 +37,7 @@ export class SettingsProvider<T> {
const oldSettings = await this.read()
const nextSettings = { ...oldSettings, ...settings }
await fs.writeFile(this.settingsPath, JSON.stringify(nextSettings, null, 2))
} catch (error) {
} catch (error: any) {
logger.warn(error.message)
}
}