Skip to content

Commit

Permalink
fix: Set verbosity if --verbose is passed anywhere period
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed Dec 28, 2021
1 parent 9802fea commit 2caf7e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bench/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@


def cli():
global from_command_line, bench_config, is_envvar_warn_set
global from_command_line, bench_config, is_envvar_warn_set, verbose

from_command_line = True
command = " ".join(sys.argv)
argv = set(sys.argv)
is_envvar_warn_set = not (os.environ.get("BENCH_DEVELOPER") or os.environ.get("CI"))
is_cli_command = len(sys.argv) > 1 and not argv.intersection({"src", "--version"})

if "--verbose" in sys.argv:
verbose = True

change_working_directory()
logger = setup_logging()
logger.info(command)
Expand Down

0 comments on commit 2caf7e7

Please sign in to comment.