mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
22 lines
565 B
JavaScript
22 lines
565 B
JavaScript
// Must run at a git working dir
|
|
|
|
import { execSync } from "child_process";
|
|
|
|
const fixCommand = `make ${process.argv[2]}`;
|
|
|
|
if (execSync("git status --porcelain=v1", { encoding: "utf8" })) {
|
|
console.log(
|
|
`Please re-run "${fixCommand}" and checkout the following changes to git`
|
|
);
|
|
execSync("git status", { stdio: "inherit" });
|
|
|
|
if (process.env.GITHUB_ACTIONS) {
|
|
console.log("::group::git diff");
|
|
execSync("git diff", { stdio: "inherit" });
|
|
console.log("::endgroup::");
|
|
}
|
|
|
|
// eslint-disable-next-line no-process-exit
|
|
process.exit(1);
|
|
}
|