Skip to content

Commit

Permalink
fix: use fs module to remove project (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Oct 9, 2023
1 parent a216206 commit e8ad618
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/snapshot.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env zx
import fs from 'node:fs'
import 'zx/globals'

$.verbose = false
Expand Down Expand Up @@ -76,7 +77,7 @@ for (const flags of flagCombinations) {
const projectName = flags.join('-')

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

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

0 comments on commit e8ad618

Please sign in to comment.