diff --git a/news/3069.trivial b/news/3069.trivial new file mode 100644 index 00000000..733a3cac --- /dev/null +++ b/news/3069.trivial @@ -0,0 +1 @@ +- Fix PIPENV_VERBOSITY parsing logic diff --git a/pipenv/environments.py b/pipenv/environments.py index ca05535f..328b3ce4 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -229,9 +229,9 @@ SESSION_IS_INTERACTIVE = bool(os.isatty(sys.stdout.fileno())) # Internal, consolidated verbosity representation as an integer. The default # level is 0, increased for wordiness and decreased for terseness. PIPENV_VERBOSITY = os.environ.get("PIPENV_VERBOSITY", "") -if PIPENV_VERBOSITY.isdigit(): +try: PIPENV_VERBOSITY = int(PIPENV_VERBOSITY) -else: +except ValueError: if PIPENV_VERBOSE: PIPENV_VERBOSITY = 1 elif PIPENV_QUIET: