Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/usr/bin in PATH #68

Open
mtelka opened this issue Jun 25, 2023 · 0 comments
Open

/usr/bin in PATH #68

mtelka opened this issue Jun 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mtelka
Copy link

mtelka commented Jun 25, 2023

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.

@hroncok hroncok added the bug Something isn't working label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants