We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35e4ab9 commit fd74c68Copy full SHA for fd74c68
packages/f2elint/src/private/install.ts
@@ -3,12 +3,15 @@ import commandExists from 'command-exists';
3
4
export async function install(projectPath: string) {
5
let npm_command = 'npm';
6
- if (await commandExists('tnpm')) {
7
- // tnpm of Alibaba and Ant Group
8
- npm_command = 'tnpm';
9
- } else if (process.env.npm_command) {
+ if (process.env.npm_command) {
10
// pnpm, yarn support npm_command environment variable
11
npm_command = process.env.npm_command;
+ } else if (await commandExists('tnpm')) {
+ // tnpm of Alibaba and Ant Group
+ npm_command = 'tnpm';
12
+ } else if (await commandExists('cnpm')) {
13
+ // cnpm of China
14
+ npm_command = 'cnpm';
15
}
16
17
await new Promise<void>((res, rej) => {
0 commit comments