Skip to content

Commit

Permalink
only show progress bar in non-verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
cmlsharp committed Jul 30, 2019
1 parent 2085026 commit 95b799d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions check50/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,13 @@ def main():
excepthook.output_file = args.output_file

if args.local:
# If developing, assume slug is a path to check_dir
if args.dev:
print("Checking...")
internal.check_dir = Path(SLUG).expanduser().resolve()
if not internal.check_dir.is_dir():
raise internal.Error(_("{} is not a directory").format(internal.check_dir))
else:
with lib50.ProgressBar("Checking") if "ansi" in args.output else nullcontext():
with lib50.ProgressBar("Checking") if not args.verbose and "ansi" in args.output else nullcontext():
# If developing, assume slug is a path to check_dir
if args.dev:
internal.check_dir = Path(SLUG).expanduser().resolve()
if not internal.check_dir.is_dir():
raise internal.Error(_("{} is not a directory").format(internal.check_dir))
else:
# Otherwise have lib50 create a local copy of slug
try:
internal.check_dir = lib50.local(SLUG, offline=args.offline)
Expand Down

0 comments on commit 95b799d

Please sign in to comment.