-
Notifications
You must be signed in to change notification settings - Fork 513
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
evaluating PATH in justfile comes too late when using which() #2597
Comments
This is actually quite tricky! I was thinking about this yesterday, but we have had the same issue with backticks and the The order of assignment evaluation is not defined, so if you have:
It is not defined whether or not So other assignments in the same scope will not see the export, but recipe defaults and recipe lines will see the export:
This is further complicated by the fact that I would suggest working around this by putting the Variables in the same scope are allowed to depend on each other, however. The So we could do something where we add an implicit dependency of |
I have bad experiences with managing PATH in .env-files. As I can easily screw up external tools like docker/vscode |
just 1.39.0
testing the which-command:
use-case: run commands in a python-virtualenv,
some commands might be installed in the .venv and others might not.
when i run a command via just, i want to display the absolute path of the command
this works when ruff is installed globally, outside the .venv:
note: I dont want to "activate my python-env".
global ruff on global $PATH is found
local ruff in .venv/bin/ruff is not found
It seems tthat the updated PATH in just comes to late,
after evaluating RUFF_EXE := which("ruff")
The text was updated successfully, but these errors were encountered: