(options)
| 186 | } |
| 187 | |
| 188 | async run(options) { |
| 189 | this.packageManager = await this.findPackageManager(options.packageManager); |
| 190 | |
| 191 | let ui = this.ui; |
| 192 | let startMessage = this.formatStartMessage(options.packages); |
| 193 | let completeMessage = this.formatCompleteMessage(options.packages); |
| 194 | |
| 195 | const prependEmoji = require('@ember-tooling/blueprint-model/utilities/prepend-emoji'); |
| 196 | |
| 197 | ui.writeLine(''); |
| 198 | ui.writeLine(prependEmoji('🚧', 'Installing packages... This might take a couple of minutes.')); |
| 199 | ui.startProgress(chalk.green(startMessage)); |
| 200 | |
| 201 | try { |
| 202 | if (this.packageManager.name === 'yarn') { |
| 203 | let args = this.toYarnArgs(this.command, options); |
| 204 | await this.yarn(args); |
| 205 | } else if (this.packageManager.name === 'pnpm') { |
| 206 | let args = this.toPNPMArgs(this.command, options); |
| 207 | await this.pnpm(args); |
| 208 | } else { |
| 209 | let args = this.toNpmArgs(this.command, options); |
| 210 | await this.npm(args); |
| 211 | } |
| 212 | } finally { |
| 213 | ui.stopProgress(); |
| 214 | } |
| 215 | |
| 216 | ui.writeLine(chalk.green(completeMessage)); |
| 217 | } |
| 218 | |
| 219 | toNpmArgs(command, options) { |
| 220 | let args = [command]; |
nothing calls this directly
no test coverage detected