Skip to content

Commit

Permalink
fix(cli): input and output cannot be the same path
Browse files Browse the repository at this point in the history
  • Loading branch information
hckhanh committed Dec 9, 2020
1 parent 7249a14 commit e183436
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ class Pg2Bigquery extends Command {
const tables = path.resolve(flags.tables);
const output = path.resolve(args.output);

if (input === output) {
cli.error("input and output cannot be the same path");
}

// create output folder
cli.action.start("checking output folder");
await fs.mkdir(output, { recursive: true });
Expand Down

0 comments on commit e183436

Please sign in to comment.