Skip to content

Commit f50f491

Browse files
committed
fix: create .sfdx if necessary for alias file
1 parent 09a0927 commit f50f491

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stateAggregator/accessors/aliasAccessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class AliasAccessor extends AsyncOptionalCreatable {
169169
try {
170170
this.aliasStore = fileContentsRawToAliasStore(await readFile(this.fileLocation, 'utf-8'));
171171
} catch (e) {
172-
if (e instanceof Error && 'code' in e && e.code === 'ENOENT') {
172+
if (e instanceof Error && 'code' in e && typeof e.code === 'string' && ['ENOENT', 'ENOTDIR'].includes(e.code)) {
173173
this.aliasStore = new Map<string, string>();
174174
await mkdir(dirname(this.fileLocation), { recursive: true });
175175
await this.saveAliasStoreToFile();

0 commit comments

Comments
 (0)