mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
ci: Block execution of npm install (no-changelog) (#4662)
ci: block execution of `npm install` (no-changelog)
This commit is contained in:
committed by
GitHub
parent
60746dc92e
commit
6b52e4b111
12
scripts/block-npm-install.js
Normal file
12
scripts/block-npm-install.js
Normal file
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user