Skip to content

Commit 7599df8

Browse files
committed
書き込み時以外gitアクセスは不要
1 parent c4a1b5b commit 7599df8

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

scripts/checkDocs.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ if (process.argv[2] === "--write") {
4242

4343
const docsDir = join(process.cwd(), "public", "docs");
4444

45-
const commit = execFileSync("git", ["rev-parse", "--short", "HEAD"], {
46-
encoding: "utf8",
47-
}).trim();
45+
let commit = "";
46+
if (doWrite) {
47+
commit = execFileSync("git", ["rev-parse", "--short", "HEAD"], {
48+
encoding: "utf8",
49+
}).trim();
50+
}
4851

4952
const langEntries = await getPagesList();
5053

0 commit comments

Comments
 (0)