Skip to content

Commit

Permalink
fix: Remove tempSrcDir regardless of whether it's a symbolic link or …
Browse files Browse the repository at this point in the history
…a directory
  • Loading branch information
phondani0 committed Aug 9, 2024
1 parent 3153e2e commit b5b29ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export function symlinkOrCopyProjectFiles(
const tempSrcDir = path.join(tempDir, "src");

if (fs.existsSync(tempSrcDir)) {
fs.unlinkSync(tempSrcDir);
// Remove the tempSrcDir directory, regardless of whether it's a symbolic link or a directory.
fs.rmSync(tempSrcDir, { recursive: true, force: true });
}

// Symlink the src directory (you can also copy it if preferred)
Expand Down

0 comments on commit b5b29ae

Please sign in to comment.