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
(...)
Running command git clone --filter=blob:none --quiet 'ssh://****@github.com/my-repo.git /tmp/pip-install-7fi75vp9/my-package_12345
WARNING: Did not find branch or tag '${PACKAGE_REF:-main}', assuming revision or ref.
Running command git checkout -q '${PACKAGE_REF:-main}'
error: pathspec '${PACKAGE_REF:-main}' did not match any file(s) known to git
error: subprocess-exited-with-error
× git checkout -q '${PACKAGE_REF:-main}' did not run successfully.
│ exit code: 1
╰─> See above for output.
the same happens regardless of whether the PACKAGE_REF is defined or not...
Expected behavior
the correct branch is checked out: master if PACKAGE_REF is not defined and $PACKAGE_REF if it is defined
pip version
24.0
Python version
Python 3.10.9 (pyenv/venv)
OS
Linux ltrojan-laptop 5.15.0-101-generic #111~20.04.1-Ubuntu SMP Mon Mar 11 15:44:43 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
How to Reproduce
create and setup a repo (with a pyproject.toml and a source folder containing some basic python code)
The ${PACKAGE_REF:-main} syntax is specific to bash (and maybe some other shells?) It's not supported by pip, so it won't get interpreted correctly in a requirements file.
ok... i miss-read another issue from a couple of years ago'.. i thought the : and the :- notation were not bash specific...
is there another way to provide a default to an env var? the idea is that the env var should be set only in "special" occasions, in this particular case if one wants to try a new feature only being developed as a new feature branch...
Description
Trying to add a default value to the git ref specified as an env var fails to parse the value correctly:
will produce the following error:
the same happens regardless of whether the
PACKAGE_REF
is defined or not...Expected behavior
the correct branch is checked out:
master
ifPACKAGE_REF
is not defined and$PACKAGE_REF
if it is definedpip version
24.0
Python version
Python 3.10.9 (pyenv/venv)
OS
Linux ltrojan-laptop 5.15.0-101-generic #111~20.04.1-Ubuntu SMP Mon Mar 11 15:44:43 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
How to Reproduce
pyproject.toml
and a source folder containing some basic python code)requirements.txt
pip install -r requirements.txt
PACKAGE_REF=my-feature-branch pip install -r requirements.txt
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: