Skip to content

Commit

Permalink
Allow click to attempt file open (#89)
Browse files Browse the repository at this point in the history
Click has error handling when passing a file as a flag.  Lets use
it.
  • Loading branch information
retr0h authored Mar 14, 2020
1 parent 2a02903 commit e7528b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gilt/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class NotFoundError(Exception):
"--config",
default="gilt.yml",
help="Path to config file. Default gilt.yml",
type=click.File('r'),
)
@click.option(
"--debug/--no-debug",
Expand Down Expand Up @@ -71,7 +72,7 @@ def main(ctx, config, debug): # pragma: no cover
ctx.obj = {}
ctx.obj["args"] = {}
ctx.obj["args"]["debug"] = debug
ctx.obj["args"]["config"] = config
ctx.obj["args"]["config"] = config.name


@click.command()
Expand Down

0 comments on commit e7528b3

Please sign in to comment.