mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
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);
|
||
|
}
|