Repository navigation
Windows + nushell + mise converts PATH env's type #5472
Replies: 2 comments
|
I ran into the same problem--mise on nushell doesn't properly convert the path to a nushell-native list. Most of the time this works fine, as long as the path stays a string. However, if anything else adds a value to the path (I came across it using python venvs too), you end up with a list of 2 items: the big, The problem comes from this function in the activate script: def --env "update-env" [] {
# ...
if $var.name == 'PATH' {
$env.PATH = ($var.value | split row (char esep))
} else {
# ...
}$env.PATH is case-insensitive in nushell 1 (actually, all environment variables are, regardless of OS 2). Mise matches whatever capitalization is in use at run time 3, which for windows is if ($var.name | str upcase) == 'PATH'I made a pr with the fix, #6157 . Manually making that change in mise.nu (and tweaking my nushell config to not regenerate mise.nu on every load) fixes it for me as a workaround. |
|
Thank you! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
without mise:

As you can see, the Path environment variable exists in nushell as a list.
with mise: (apply

mise activate nu)However, when the mise activate nu script is applied, the Path environment variable is changed to a string.
I discovered this issue when using nushell + python venv in my vscode terminal, as it did not recognize PATH.
mise doctor:
nushell config
All reactions