Skip to content

Commit 73eb09e

Browse files
committed
Update validate-template.mjs
1 parent d64ef1e commit 73eb09e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎scripts/validate-template.mjs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import { promises as fs } from "node:fs";
44
import path from "node:path";
5-
import process from "node:process";
5+
import { fileURLToPath } from "node:url";
66

7-
const repoRoot = process.cwd();
7+
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
88
const errors = [];
99
const warnings = [];
1010

@@ -603,7 +603,7 @@ function summarizeAndExit() {
603603
for (const error of errors) {
604604
console.error(`- ${error}`);
605605
}
606-
process.exit(1);
606+
throw new Error("Repository validation failed.");
607607
}
608608

609609
console.log("Validation passed.");

0 commit comments

Comments
 (0)