Skip to content

Commit 973450e

Browse files
committed
Check EISDIR for Mac when performing mkdir
1 parent abca4a9 commit 973450e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

packages/ide/test/fs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("fs", () => {
2525
try {
2626
await util.promisify(nativeFs.mkdir)(path.dirname(coderDir));
2727
} catch (error) {
28-
if (error.code !== "EEXIST") {
28+
if (error.code !== "EEXIST" && error.code !== "EISDIR") {
2929
throw error;
3030
}
3131
}

packages/ide/test/net.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("net", () => {
1919
try {
2020
await util.promisify(fs.mkdir)(path.dirname(coderDir));
2121
} catch (error) {
22-
if (error.code !== "EEXIST") {
22+
if (error.code !== "EEXIST" && error.code !== "EISDIR") {
2323
throw error;
2424
}
2525
}

packages/protocol/src/node/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class Server {
5151
try {
5252
await promisify(mkdir)(dir);
5353
} catch (error) {
54-
if (error.code !== "EEXIST") {
54+
if (error.code !== "EEXIST" && error.code !== "EISDIR") {
5555
throw error;
5656
}
5757
}

packages/server/src/modules.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const setup = (dataDirectory: string): void => {
1313
try {
1414
fs.mkdirSync(currentDir);
1515
} catch (ex) {
16-
if (ex.code !== "EEXIST") {
16+
if (ex.code !== "EEXIST" && ex.code !== "EISDIR") {
1717
throw ex;
1818
}
1919
}

packages/server/src/vscode/sharedProcess.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class SharedProcess {
5454
try {
5555
fs.mkdirSync(dir);
5656
} catch (ex) {
57-
if (ex.code !== "EEXIST") {
57+
if (ex.code !== "EEXIST" && ex.code !== "EISDIR") {
5858
throw ex;
5959
}
6060
}

0 commit comments

Comments
 (0)