mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
705cb0614d
This pull request makes a minor correction to the error message in `scripts/rm.mjs` to fix a typo. * The error message now correctly reads "requires at least one parameter" instead of "requires a least one parameter". Co-authored-by: Marcos Hernanz <96699542+marcoshernanz@users.noreply.github.com>
14 lines
366 B
JavaScript
14 lines
366 B
JavaScript
// @ts-check
|
|
import { rm } from 'fs/promises'
|
|
import { join } from 'path'
|
|
|
|
const args = process.argv.slice(2)
|
|
if (args.length === 0) {
|
|
throw new Error('rm.mjs: requires at least one parameter')
|
|
}
|
|
for (const arg of args) {
|
|
const path = join(process.cwd(), arg)
|
|
console.log(`rm.mjs: deleting path "${path}"`)
|
|
await rm(path, { recursive: true, force: true })
|
|
}
|