mise failed to activate in nushell 0.99.0 #3552
Replies: 4 comments
-
Looks like it could possibly be due to this change: I am assuming this is a bug in nushell 0.99, as the change hasn't been documented in their changelog. I have rolled back to nushell v.0.98.0 for now |
Beta Was this translation helpful? Give feedback.
-
Facing the very same issue, closing the one i had opened here as i didn't realized this is an ongoing issue since over a month |
Beta Was this translation helpful? Give feedback.
-
I ran into the same issue, I managed to solve it by appending the following at top of the generated file $env.config = ($env | default {} config).config
$env.config = ($env.config | default {} hooks)
$env.config = ($env.config | update hooks ($env.config.hooks | default {} env_change))
$env.config = ($env.config | update hooks.env_change ($env.config.hooks.env_change | default [] PWD)) This will add the default PWD if it does not exist in I'm using nixos with home-manager for this, so I'm using the following code { config, pkgs, ... }:
let
miseCmd = "${config.home.profileDirectory}/bin/mise";
in
{
# mise
programs.mise.enable = true;
programs.nushell = {
extraEnv = ''
let mise_cache = "${config.xdg.cacheHome}/mise"
if not ($mise_cache | path exists) {
mkdir $mise_cache
}
$env.config = ($env | default {} config).config
$env.config = ($env.config | default {} hooks)
$env.config = ($env.config | update hooks ($env.config.hooks | default {} env_change))
$env.config = ($env.config | update hooks.env_change ($env.config.hooks.env_change | default [] PWD))
${miseCmd} activate nu | save --force ${config.xdg.cacheHome}/mise/mise.nu
'';
extraConfig = ''
use ${config.xdg.cacheHome}/mise/mise.nu
'';
};
} |
Beta Was this translation helpful? Give feedback.
-
Oh i forgot to update here that the fix for this issue has already been merged in nushell. It will be available in the next release nushell/nushell#14341. PS / Info given by nushell dev on discord |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
mise failed to activate in Nushell 0.99.0:
To Reproduce
Expected behavior
Should not have any error when nu starts.
node -v
should also workmise doctor
outputAdditional context
Add any other context about the problem here. Consider running mise with
--debug
or--trace
for extra debug info.Beta Was this translation helpful? Give feedback.
All reactions