Skip to content

Commit

Permalink
fix clean project fn
Browse files Browse the repository at this point in the history
  • Loading branch information
MP281X committed Jun 24, 2024
1 parent 02bdbef commit 1b07abc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/cleanProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export const cleanProject = (dir: string = process.cwd()) => {
try {
if (path.includes('.git')) continue

if (filesToDelete.includes(path)) fs.rmSync(path, { force: true, recursive: true })

if (fs.statSync(`${dir}/${path}`).isDirectory()) cleanProject(`${dir}/${path}`)
const filePath = `${dir}/${path}`
if (filesToDelete.includes(path)) fs.rmSync(filePath, { force: true, recursive: true })
if (fs.statSync(filePath).isDirectory()) cleanProject(filePath)
} catch {}
}
}

0 comments on commit 1b07abc

Please sign in to comment.