Files
babel/scripts/assert-dir-git-clean.js
T
Huáng JùnliàngandGitHub de7233b905 bump typescript and linter versions (#15086)
* bump typescript and linter versions

* check uncommitted files after lint

* Update .github/workflows/ci.yml
2022-10-28 10:07:12 +02:00

15 lines
404 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" });
// eslint-disable-next-line no-process-exit
process.exit(1);
}