diff --git a/news/6225.bugfix.rst b/news/6225.bugfix.rst new file mode 100644 index 0000000000..ef926c2971 --- /dev/null +++ b/news/6225.bugfix.rst @@ -0,0 +1 @@ +Corrected behavior of ``pipenv install --skip-lock`` after behavioral install refactor introduced regression. No Pipfile.lock is generated with this fix and installation of vcs no longer fails with revision missing error. diff --git a/pipenv/routines/install.py b/pipenv/routines/install.py index e299ef7e5f..1523fdbb67 100644 --- a/pipenv/routines/install.py +++ b/pipenv/routines/install.py @@ -630,15 +630,11 @@ def do_init( packages=packages, editable_packages=editable_packages, ) - # Write out the lockfile if it doesn't exist. - if not project.lockfile_exists: + # Write out the lockfile if it doesn't exist and skip_lock is False + if not project.lockfile_exists and not skip_lock: # Unless we're in a virtualenv not managed by pipenv, abort if we're # using the system's python. - if ( - (system or allow_global) - and not (project.s.PIPENV_VIRTUALENV) - and skip_lock is False - ): + if (system or allow_global) and not project.s.PIPENV_VIRTUALENV: raise exceptions.PipenvOptionsError( "--system", "--system is intended to be used for Pipfile installation, "