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
Have $env.ENV_CONVERSIONS changes take place immediately #14514
nu_engine::convert_env_values() is the function which handles ENV_CONVERSIONS for from_string. Currently, it has to be run "manually", so we do this several times during startup, basically whenever we know that we've changed, or assume that the user has changed, the $env.ENV_CONVERSIONS.
Immediately after default_env.nu is evaluated, to pick up the PATH conversion in that file.
Immediately before the user's config.nu so that any changes they've made in their env.nu can be used.
After the user's env.nu in case they made any additional changes there.
Changes to the from_string in ENV_CONVERSIONS are never used.
Describe the solution you'd like
Things could be streamlined quite a bit if we run nu_engine::convert_env_values() any time that $env.ENV_CONVERSIONS is updated.
We'd avoid a few potentially unnecessary calls.
The user could change $env.ENV_CONVERSIONS and make use of them in the same file (e.g., config.nu). This could allow the user to go without an env.nu entirely in many cases.
The user (or even third-party code) could update $env.ENV_CONVERSIONS at any point after startup and add new conversions.
Activity
Run ENV_CONVERSIONS whenever it's modified (#14591)