1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-12-29 15:14:40 +03:00
n8n/scripts/block-npm-install.js
कारतोफ्फेलस्क्रिप्ट™ 6b52e4b111
ci: Block execution of npm install (no-changelog) (#4662)
ci: block execution of `npm install` (no-changelog)
2022-11-21 12:53:11 +01:00

13 lines
686 B
JavaScript

const { npm_config_user_agent: UA } = process.env;
const [packageManager] = (UA ?? '').split(' ');
const [name, version] = packageManager.split('/');
if (name !== 'pnpm') {
const suggestion = '\033[1;92mpnpm\033[0;31m';
console.error('\033[0;31m');
console.error('╭───────────────────────────────────────────╮');
console.error(`\tPlease use ${suggestion} instead of ${name} \t`);
console.error('╰───────────────────────────────────────────╯');
console.error('\033[0m');
process.exit(1);
}