@@ -76,19 +76,30 @@ export async function pkgManagerArgs(npmClient: NpmClient, options: PkgManagerOp
76
76
}
77
77
}
78
78
79
+ const installerExec : string = '' ;
79
80
const installerArgs : string [ ] = [ ] ;
80
81
81
82
switch ( npmClient ) {
82
83
case 'npm' :
84
+ installerExec = 'npm' ;
83
85
vocab = { run : 'run' , install : 'i' , bareInstall : 'i' , uninstall : 'uninstall' , dedupe : 'dedupe' , rebuild : 'rebuild' , global : '-g' , save : '--save' , saveDev : '-D' , saveExact : '-E' , nonInteractive : '' , lockFileOnly : '--package-lock-only' } ;
84
86
break ;
85
87
case 'yarn' :
88
+ installerExec = 'yarn' ;
86
89
vocab = { run : 'run' , install : 'add' , bareInstall : 'install' , uninstall : 'remove' , dedupe : '' , rebuild : 'install' , global : '' , save : '' , saveDev : '--dev' , saveExact : '--exact' , nonInteractive : '--non-interactive' , lockFileOnly : '' } ;
87
90
if ( options . global ) { // yarn installs packages globally under the 'global' prefix, instead of having a flag
88
91
installerArgs . push ( 'global' ) ;
89
92
}
90
93
break ;
94
+ case 'yarn-berry' :
95
+ installerExec = 'yarn' ;
96
+ vocab = { run : 'run' , install : 'add' , bareInstall : 'install' , uninstall : 'remove' , dedupe : '' , rebuild : 'install' , global : '' , save : '' , saveDev : '--dev' , saveExact : '--exact' , nonInteractive : '' , lockFileOnly : '' } ;
97
+ if ( options . global ) { // yarn installs packages globally under the 'global' prefix, instead of having a flag
98
+ installerArgs . push ( 'global' ) ;
99
+ }
100
+ break ;
91
101
case 'pnpm' :
102
+ installerExec = 'pnpm' ;
92
103
vocab = { run : 'run' , install : 'add' , bareInstall : 'install' , uninstall : 'remove' , dedupe : '' , rebuild : 'rebuild' , global : '--global' , save : '' , saveDev : '--save-dev' , saveExact : '--save-exact' , nonInteractive : '' , lockFileOnly : '--lockfile-only' } ;
93
104
break ;
94
105
default :
@@ -171,7 +182,7 @@ export async function pkgManagerArgs(npmClient: NpmClient, options: PkgManagerOp
171
182
installerArgs . push ( '--json' ) ;
172
183
}
173
184
174
- return [ npmClient , ...installerArgs ] ;
185
+ return [ installerExec , ...installerArgs ] ;
175
186
}
176
187
177
188
/**
0 commit comments