You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command pipenv check --system doesn't work with the --system option.
This seems related to this commit. The do_check command calls the get_requirements function without passing the system argument, which is hardcoded to False in the function.
Expected result
Expected a safety report on packages vulnerabilities.
Actual result
$ pipenv check --system --verbose
Loading .env environment variables...
Checking PEP 508 requirements...
Running command: $ /usr/local/bin/python3 /usr/local/lib/python3.12/site-packages/pipenv/pep508checker.py
Command output: {"os_name": "posix", "sys_platform": "linux", "platform_machine": "x86_64", "platform_python_implementation": "CPython", "platform_release": "6.11.0-17-generic", "platform_system": "Linux", "platform_version": "#17~24.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 20 22:48:29 UTC 2", "python_version": "3.12", "python_full_version": "3.12.9", "implementation_name": "cpython", "implementation_version": "3.12.9"}
Passed!
Checking Pipfile.lock packages for vulnerabilities...
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/cli/options.py", line 52, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/cli/command.py", line 519, in check
do_check(
File "/usr/local/lib/python3.12/site-packages/pipenv/routines/check.py", line 242, in do_check
requirements = get_requirements(project, use_installed, categories)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/routines/check.py", line 96, in get_requirements
_cmd = [project_python(project, system=False)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/utils/shell.py", line 408, in project_python
python = project._which("python")
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pipenv/project.py", line 1451, in _which
raise RuntimeError("location not created nor specified")
RuntimeError: location not created nor specified
Issue description
The command
pipenv check --system
doesn't work with the--system
option.This seems related to this commit. The do_check command calls the get_requirements function without passing the
system
argument, which is hardcoded toFalse
in the function.Expected result
Expected a safety report on packages vulnerabilities.
Actual result
$ pipenv check --system --verbose
Steps to replicate
Start from an empty folder.
Tested on
Ubuntu 24.04
and inpython:3.12-alpine
andpython:3.12-slim-bullseye
containers.$ pipenv --support
Pipenv version:
'2024.4.1'
Pipenv location:
'/usr/local/lib/python3.12/site-packages/pipenv'
Python location:
'/usr/local/bin/python3.12'
OS Name:
'posix'
User pip version:
'24.3.1'
user Python installations found:
PEP 508 Information:
System environment variables:
PYTHON_SHA256
HOSTNAME
PYTHON_VERSION
PWD
HOME
LANG
GPG_KEY
TERM
SHLVL
PATH
_
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG
:C.UTF-8
PWD
:/
Contents of
Pipfile
('/Pipfile'):Contents of
Pipfile.lock
('/Pipfile.lock'):The text was updated successfully, but these errors were encountered: