Skip to content

Commit

Permalink
Remove check on file
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanduplenskikh committed Nov 14, 2024
1 parent 5b01aff commit f14f58d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions node/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1027,10 +1027,8 @@ export function mv(source: string, dest: string, options?: string, continueOnErr
throw new Error(loc('LIB_DestinationNotExist', dest));
}

if (fs.existsSync(dest)) {
if (isNoClobber && fs.statSync(dest).isFile()) {
return;
}
if (fs.existsSync(dest) && isNoClobber) {
return;
}

fs.renameSync(source, dest);
Expand Down

0 comments on commit f14f58d

Please sign in to comment.