mirror of
https://github.com/n8n-io/n8n.git
synced 2026-07-27 19:15:01 +02:00
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Matsuuu <matias.huhta@n8n.io>
23 lines
658 B
JavaScript
23 lines
658 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import { execFileSync, execSync } from 'node:child_process';
|
|
import { resolve } from 'node:path';
|
|
|
|
// Skip lefthook install in CI or Docker build
|
|
if (process.env.CI || process.env.DOCKER_BUILD) {
|
|
process.exit(0);
|
|
}
|
|
|
|
execSync('pnpm lefthook install', { stdio: 'inherit' });
|
|
|
|
// Opt-in anonymous dev-tooling metrics (internal developers only). Best-effort:
|
|
// must never break `pnpm install`.
|
|
try {
|
|
// execFileSync (no shell) so a checkout path with spaces still works.
|
|
execFileSync('node', [resolve(import.meta.dirname, 'dev-metrics', 'setup.mjs')], {
|
|
stdio: 'inherit',
|
|
});
|
|
} catch {
|
|
// ignore — metrics setup is non-essential
|
|
}
|