ci: use git when running as an Action
This commit is contained in:
@@ -30,7 +30,12 @@ await logStep("Comparing env.d.ts", async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
spawn({ cmd: ["sl", "diff", "src/types/env.d.ts"], stdout: "inherit" });
|
||||
const isCI = process.env["IS_CI"] === "true";
|
||||
const vcsCommand = isCI ? "git" : "sl";
|
||||
spawn({
|
||||
cmd: [vcsCommand, "diff", "src/types/env.d.ts"],
|
||||
stdout: "inherit",
|
||||
});
|
||||
// add 1 second to make sure spawn completes
|
||||
await sleep(1000);
|
||||
throw new Error("env.d.ts is out of date");
|
||||
|
||||
Reference in New Issue
Block a user