diff --git a/news/4797.feature.rst b/news/4797.feature.rst new file mode 100644 index 00000000..e2d7b3d1 --- /dev/null +++ b/news/4797.feature.rst @@ -0,0 +1 @@ +Use environment variable `PIPENV_SKIP_LOCK` to control the behaviour of lock skipping. \ No newline at end of file diff --git a/pipenv/environments.py b/pipenv/environments.py index 4395e7cd..aad662b1 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -313,13 +313,15 @@ class Setting: if interactive. """ - self.PIPENV_SKIP_LOCK = False + self.PIPENV_SKIP_LOCK = bool(os.environ.get("PIPENV_SKIP_LOCK", False)) """If set, Pipenv won't lock dependencies automatically. This might be desirable if a project has large number of dependencies, because locking is an inherently slow operation. Default is to lock dependencies and update ``Pipfile.lock`` on each run. + + Usage: `export PIPENV_SKIP_LOCK=true` OR `export PIPENV_SKIP_LOCK=1` to skip automatic locking NOTE: This only affects the ``install`` and ``uninstall`` commands. """