Skip to content

Commit ae904ec

Browse files
authored
Fix the build getting stuck when /link /out: is used to specify the program name (#11281)
* Also make sure the mkdir command works
1 parent 3bde088 commit ae904ec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Extension/src/common.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ export function findExePathInArgs(args: string[]): string | undefined {
358358
if (exePath?.startsWith("/Fe")) {
359359
return exePath.substring(3);
360360
}
361+
if (exePath?.toLowerCase().startsWith("/out:")) {
362+
return exePath.substring(5);
363+
}
361364
return exePath;
362365
}
363366

@@ -538,7 +541,7 @@ export function createDirIfNotExistsSync(filePath: string | undefined): void {
538541
}
539542
const dirPath: string = path.dirname(filePath);
540543
if (!checkDirectoryExistsSync(dirPath)) {
541-
fs.mkdirSync(dirPath);
544+
fs.mkdirSync(dirPath, { recursive: true });
542545
}
543546
}
544547

0 commit comments

Comments
 (0)