You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NU_LIB_DIRS environment variable no longer working #8870
Update: It's not related to the NU_LIB_DIRS PRs but at some point the way $nu.config-path is set changed. Now, it doesn't point at the default location anymore, but instead is set based on the --config flag and also resolves a symlink which is what caused my problem. Therefore, setting
If no one is addressing this issue, I would like to.
But I am just a little confused and want to make sure my understanding.
I think the problem is that a user using a custom config directory (not default config dir /home/<username>/.config/nushell/) can't load scripts, which are placed in the default config dir, by using NU_LIB_DIRS now.
Is it correct?
Yeah, if you look at the default env.nu lines I linked above, you see the NU_LIB_DIRS is derived from $nu.config-path which can change depending on multiple factors. So, we need some way to refer to the default config directory so that the NU_LIB_DIRS would always be pointing at /home/<username>/.config/nushell/scripts.
The implementation should be quite easy: The $nu contents are defined during evaluation here and the implementation of the NuVariable is here.
Activity
kubouch commentedon Apr 13, 2023
Update: It's not related to the NU_LIB_DIRS PRs but at some point the way
$nu.config-pathis set changed. Now, it doesn't point at the default location anymore, but instead is set based on the--configflag and also resolves a symlink which is what caused my problem. Therefore, setting(as set in default env.nu) is not reliable anymore. We should probably have
$nu.default-config-diror something like that for this to keep working.fdncred commentedon Apr 13, 2023
Maybe it was this PR #8792
kubouch commentedon Apr 13, 2023
Yeah, I think that PR is a good change, now we just need some way to refer to the default config location.
ito-hiroki commentedon Apr 13, 2023
If no one is addressing this issue, I would like to.
But I am just a little confused and want to make sure my understanding.
I think the problem is that a user using a custom config directory (not default config dir
/home/<username>/.config/nushell/) can't load scripts, which are placed in the default config dir, by using NU_LIB_DIRS now.Is it correct?
kubouch commentedon Apr 13, 2023
Yeah, if you look at the default env.nu lines I linked above, you see the NU_LIB_DIRS is derived from
$nu.config-pathwhich can change depending on multiple factors. So, we need some way to refer to the default config directory so that the NU_LIB_DIRS would always be pointing at/home/<username>/.config/nushell/scripts.The implementation should be quite easy: The
$nucontents are defined during evaluation here and the implementation of the NuVariable is here.