Skip to content

Commit

Permalink
fix(exposed/fs): fixes copy, destination existence should be recursiv…
Browse files Browse the repository at this point in the history
…ely evaluated, hence handled by
  • Loading branch information
rafamel committed Apr 29, 2019
1 parent 4fdef72 commit 6e709b8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/exposed/fs/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ function copy(src: string, dest: string, ...args: any[]): () => Promise<void> {
const srcExist = await exists(src, { fail: options.fail });
if (!srcExist) return;

const destExists = await exists(dest);
if (destExists) {
if (options.fail) {
throw Error(`Destination already exists: ${relatives.dest}`);
}
if (!options.overwrite) return;
}

if (
!(await confirm(
`Copy "${relatives.src}" to "${relatives.dest}"?`,
Expand Down

0 comments on commit 6e709b8

Please sign in to comment.