mise run
, mise exec
: uses previous value of removed env var on first run after var removal
#2895
Labels
bug
Something isn't working
Describe the bug
This is clearly a shell "activate" mode issue. Maybe it's even not a bug, but an UX issue. Maybe it's good enough to just document it instead of fixing.
If mise config is edited not in the current shell (e.g. in IDE) and some env.var is removed (using any way: commented, set to
false
, deleted), and first executed command after this edit ismise run
ormise exec
, then they'll use previous (deleted) value for this variable. This happens because current shell had no chance to executemise hook-env
after edit thus current shell still have this var set to old value andmise run/exec
gets it in same way as any manually set in a shell variable.To Reproduce
Use two shells:
Expected behavior
Well, in an ideal world, I'd like to avoid
mise exec/run
execution with variables which doesn't match current config. After all, doc states "Of course, tasks launched with mise will include the mise environment—your tools and env vars defined in mise.toml." and this is violated here.mise doctor
outputThe text was updated successfully, but these errors were encountered: