mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Improve handling of CI varaible for build systems that set it to a string like azure.
This commit is contained in:
@@ -81,7 +81,15 @@ def normalize_pipfile_path(p):
|
||||
os.environ.pop("__PYVENV_LAUNCHER__", None)
|
||||
# Internal, to tell whether the command line session is interactive.
|
||||
SESSION_IS_INTERACTIVE = _isatty(sys.stdout)
|
||||
PIPENV_IS_CI = env_to_bool(os.environ.get("CI") or os.environ.get("TF_BUILD") or False)
|
||||
|
||||
# TF_BUILD indicates to Azure pipelines it is a build step
|
||||
PIPENV_IS_CI = os.environ.get("CI") or os.environ.get("TF_BUILD")
|
||||
try:
|
||||
PIPENV_IS_CI = env_to_bool(PIPENV_IS_CI)
|
||||
except ValueError:
|
||||
# CI variable detected and it did not evaluate to a false value
|
||||
PIPENV_IS_CI = True
|
||||
|
||||
NO_COLOR = False
|
||||
if os.getenv("NO_COLOR") or os.getenv("PIPENV_COLORBLIND"):
|
||||
NO_COLOR = True
|
||||
|
||||
Reference in New Issue
Block a user