mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
6b52e4b111
ci: block execution of `npm install` (no-changelog)
13 lines
686 B
JavaScript
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);
|
|
}
|