Skip to content

Commit f48e565

Browse files
authored
fixed error with outputfile option
1 parent 2ed1c97 commit f48e565

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

db_diff/cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@click.command(
77
context_settings={"help_option_names": ["-h", "--help"]},
88
help="Compare the differences between two CSV or JSON files.",
9-
epilog="Example: db-diff old.csv new.csv --key=Id --output=jsonfile --filename=diff.json",
9+
epilog="Example: db-diff old.csv new.csv --key=Id --output=jsonfile --outputfile=diff.json",
1010
)
1111
@click.argument(
1212
"previous",
@@ -56,7 +56,8 @@
5656
help="Output format. Available: (readable|json|jsonfile) (default: readable)",
5757
)
5858
@click.option(
59-
"--filename",
59+
"--outputfile",
60+
"output_file",
6061
type=click.Path(file_okay=True, dir_okay=False, writable=True, resolve_path=True),
6162
default=None,
6263
help="File to write JSON output to (only used with --output=jsonfile)",
@@ -80,7 +81,7 @@ def cli(
8081

8182
if output == "jsonfile" and not output_file:
8283
raise click.UsageError(
83-
"--filename must be specified when --output=jsonfile (example: --filename=diff.json)",
84+
"--outputfile must be specified when --output=jsonfile",
8485
ctx=click.get_current_context(),
8586
)
8687

0 commit comments

Comments
 (0)