We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09a0927 commit f50f491Copy full SHA for f50f491
src/stateAggregator/accessors/aliasAccessor.ts
@@ -169,7 +169,7 @@ export class AliasAccessor extends AsyncOptionalCreatable {
169
try {
170
this.aliasStore = fileContentsRawToAliasStore(await readFile(this.fileLocation, 'utf-8'));
171
} catch (e) {
172
- if (e instanceof Error && 'code' in e && e.code === 'ENOENT') {
+ if (e instanceof Error && 'code' in e && typeof e.code === 'string' && ['ENOENT', 'ENOTDIR'].includes(e.code)) {
173
this.aliasStore = new Map<string, string>();
174
await mkdir(dirname(this.fileLocation), { recursive: true });
175
await this.saveAliasStoreToFile();
0 commit comments