Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
guqiankun.gqk committed Dec 15, 2023
1 parent 503dd77 commit 09178d5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/preinstall.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
if (!/yarn\.js$/.test(process.env.npm_execpath || '')) {
console.warn('\u001b[33m⚠ 需要使用 Yarn >= 1.x 以支持 Workspaces\u001b[39m\n');
let err = false;

if (!/yarn$|yarn[\w-.]*\.c?js$|yarnpkg$/.test(process.env['npm_execpath'])) {
console.error('\033[1;31mPlease use yarn to install dependencies.\033[0;0m');
err = true;
}

if (err) {
console.error('');
process.exit(1);
}

0 comments on commit 09178d5

Please sign in to comment.