(keys)
| 287 | } |
| 288 | |
| 289 | async npxRm (keys) { |
| 290 | if (!keys.length) { |
| 291 | if (!this.npm.config.get('force')) { |
| 292 | throw this.usageError('Please use --force to remove entire npx cache') |
| 293 | } |
| 294 | const { npxCache } = this.npm.flatOptions |
| 295 | if (!this.npm.config.get('dry-run')) { |
| 296 | return fs.rm(npxCache, { recursive: true, force: true }) |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | const cache = await this.#npxCache(keys) |
| 301 | for (const key in cache) { |
| 302 | const { path: cachePath } = cache[key] |
| 303 | output.standard(`Removing npx key at ${cachePath}`) |
| 304 | if (!this.npm.config.get('dry-run')) { |
| 305 | await fs.rm(cachePath, { recursive: true }) |
| 306 | } |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | async npxInfo (keys) { |
| 311 | const chalk = this.npm.chalk |
no test coverage detected