Files
agiledancers/agiledancers-fe/tools/install-hooks.mjs
Wanja Krah 8f3026e6cd
All checks were successful
Build, test and publish / verify (push) Successful in 1m40s
S2 EsLint implementation
2026-10-29 22:05:11 +01:00

14 lines
473 B
JavaScript

import { existsSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import husky from 'husky';
// Docker uses CI=true; CI and local opt-out must never change Git configuration.
if (!process.env.CI && process.env.HUSKY !== '0') {
const root = fileURLToPath(new URL('../../', import.meta.url));
if (existsSync(new URL('../../.git', import.meta.url))) {
process.chdir(root);
const error = husky('.husky');
if (error) throw new Error(error);
}
}