Skip to content

Commit b91d9c1

Browse files
committed
Correctly check for submodule
1 parent 70587ac commit b91d9c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Herebyfile.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ const typeScriptSubmodulePath = path.join(__dirname, "_submodules", "TypeScript"
1616

1717
function assertTypeScriptCloned() {
1818
try {
19-
const stat = fs.statSync(typeScriptSubmodulePath);
19+
const stat = fs.statSync(path.join(typeScriptSubmodulePath, "package.json"));
2020
if (stat.isDirectory()) {
2121
return;
2222
}
2323
}
2424
catch {}
2525

26-
throw new Error("_submodules/TypeScript does not exist");
26+
console.error("_submodules/TypeScript does not exist; try running `git submodule update --init --recursive`");
27+
process.exit(1);
2728
}
2829

2930
export const build = task({

0 commit comments

Comments
 (0)