Files
Agent-n8n/n8n-n8n-1.109.2/scripts/ensure-zx.mjs
2025-09-08 04:48:28 +08:00

18 lines
364 B
JavaScript
Executable File

import { accessSync, constants } from 'node:fs';
import { execSync } from 'node:child_process';
const ZX_PATH = 'node_modules/.bin/zx';
if (!zxExists()) {
execSync('pnpm --frozen-lockfile --filter n8n-monorepo install', { stdio: 'inherit' });
}
function zxExists() {
try {
accessSync(ZX_PATH, constants.F_OK);
return true;
} catch {
return false;
}
}