Skip to content

Commit a1a19d9

Browse files
committed
fix: use fs module to remove project (#349)
1 parent 0f00f6b commit a1a19d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/snapshot.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env zx
2+
import fs from 'node:fs'
23
import 'zx/globals'
34

45
$.verbose = false
@@ -76,7 +77,7 @@ for (const flags of flagCombinations) {
7677
const projectName = flags.join('-')
7778

7879
console.log(`Removing previously generated project ${projectName}`)
79-
await $`rm -rf ${projectName}`
80+
fs.rmSync(projectName, { recursive: true, force: true })
8081

8182
console.log(`Creating project ${projectName}`)
8283
await $`node ${[bin, projectName, ...flags.map((flag) => `--${flag}`), '--force']}`

0 commit comments

Comments
 (0)