fix(dev-infra): detect GitHub Actions installs

This commit is contained in:
Tianyi Cui
2026-07-27 22:00:36 +08:00
parent 1f8a3dd7b1
commit 74c1a76440
8 changed files with 32 additions and 26 deletions

View File

@@ -569,7 +569,7 @@ function refuseScopedHooksPath(entry) {
}
async function main() {
if (process.env.CI === 'true') return
if (process.env.CI === 'true' || process.env.GITHUB_ACTIONS === 'true') return
const probe = spawnSync('git', ['rev-parse', '--show-toplevel'], { encoding: 'utf8' })
if (probe.status !== 0) return
const root = stripGitLineTerminator(probe.stdout)