fedora-python / fedora-python/tox-current-env
/usr/bin in PATH
- Lenguaje dominante
- Python
- Estrellas
- 26
- Forks
- 9
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Currently `tox-current-env` adds `/usr/bin` to `PATH` _before_ the current `PATH` from environment:
```
$ cat my-run
#!/bin/sh
echo "PATH = $PATH"
$ cat tox.ini
[testenv]
allowlist_externals = my-run
commands = my-run
$ env - PATH=/tmp/test /usr/bin/tox-3.9 --current-env --no-provision --recreate -e py39
ROOT: tox-gh-actions won't override envlist because tox is not running in GitHub Actions
py39: remove tox env folder /tmp/test/.tox/py39
py39: commands[0]> my-run
PATH = /tmp/test/.tox/py39/bin:/usr/bin:/tmp/test
py39: OK (0.08=setup[0.04]+cmd[0.04] seconds)
congratulations :) (0.54 seconds)
$ env - PATH=/tmp/test /usr/bin/tox-3.9 --no-provision --recreate -e py39
ROOT: tox-gh-actions won't override envlist because tox is not running in GitHub Actions
py39: remove tox env folder /tmp/test/.tox/py39
py39: commands[0]> my-run
PATH = /tmp/test/.tox/py39/bin:/tmp/test
py39: OK (0.49=setup[0.46]+cmd[0.03] seconds)
congratulations :) (0.94 seconds)
$
```
This usually works okay, but in a case we need to override some command in `/usr/bin` by pointing `PATH` to some other location we simply can't.
Could you please either do not add `/usr/bin` to `PATH` at all, or add it _after_ the `PATH` from environment?
Thank you.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Reproduce el comportamiento usando el tox.ini mostrado, el script my-run y los dos comandos de tox con distintos valores de PATH. Empieza localizando la configuración de PATH de tox-current-env y verifica si /usr/bin se antepone únicamente para --current-env. Se considera terminado cuando el PATH del entorno tiene precedencia, ya sea omitiendo /usr/bin o añadiéndolo después.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 45/100