Files
Mayur 705cb0614d fix(scripts): correct typo in rm.mjs error message (#87015)
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>
2026-08-10 14:55:57 -07:00

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 })
}