Skip to content

Commit

Permalink
fix: πŸ› ensure fork logic checks file existence
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Oct 31, 2024
1 parent a7d83bc commit eed237f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function copyPrompt(
let fn = promptPath(n)

// Handle forking logic by appending a suffix if needed
if (options.fork) {
if (options.fork && (await fileExists(fn))) {
let suff = 2
for (;;) {
fn = promptPath(n + "_" + suff) // Construct new name with suffix
Expand Down

0 comments on commit eed237f

Please sign in to comment.