Open albireox opened 3 weeks ago
Seconding this issue:
Paul_Glushak@Paul ~> pwd
/Users/Paul_Glushak
Paul_Glushak@Paul ~> echo $PATH | sed 's/ /\n/g'
/Users/Paul_Glushak/dev/forter-dev-cli/.venv/bin
/Users/Paul_Glushak/.local/share/mise/installs/pipx/latest/bin
/Users/Paul_Glushak/.local/share/mise/installs/python/latest/bin
/Users/Paul_Glushak/.local/share/mise/installs/poetry/latest/bin
/Users/Paul_Glushak/.local/share/mise/installs/usage/latest/bin
/Users/Paul_Glushak/.local/bin
/opt/homebrew/bin
...
Then cd
somewhere else
Paul_Glushak@Paul ~> z boku
Paul_Glushak@Paul ~/d/boku (main)> cat .mise.toml
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: .mise.toml
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ [tools]
2 │ python = "latest"
3 │
4 │ [env]
5 │ _.python.venv = { path = ".venv", create = true }
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Paul_Glushak@Paul ~/d/boku (main)> echo $PATH | sed 's/ /\n/g'
/Users/Paul_Glushak/dev/forter-dev-cli/.venv/bin
/Users/Paul_Glushak/dev/boku/.venv/bin
/Users/Paul_Glushak/.local/share/mise/installs/python/latest/bin
/Users/Paul_Glushak/.local/share/mise/installs/pipx/latest/bin
/Users/Paul_Glushak/.local/share/mise/installs/poetry/latest/bin
/Users/Paul_Glushak/.local/share/mise/installs/usage/latest/bin
/Users/Paul_Glushak/.local/bin
/opt/homebrew/bin
...
Paul_Glushak@Paul ~/d/boku (main)>
It looks like the incorrect path value exists in both $PATH
as well as $MISE_SHELL
:
MISE_SHELL=fish set -gx __MISE_ORIG_PATH /Users/Paul_Glushak/dev/forter-dev-cli/.venv/bin /Users/Paul_Glushak/.local/share/mise/installs/pipx/latest/bin ...
this is by design, mise doesn't modify PATH to override things after it was activated to prevent it from aggressively modifying PATH. The activate_aggressive
setting modifies this behavior.
Describe the bug
When one already has a virtualenv active, a
.mise.toml
file with a_.python.venv
directive will add the commanded venv to PATH but always after the already active one. For example if I have a$PATH
likewhere
/Users/gallegoj/.local/share/virtualenv/gallegoj/bin
is an activated environment, andcd
to a directory with a.mise.toml
the resulting
$PATH
will beinstead of the expected
I've only tested this in
fish
.mise doctor
output