fnm
fnm copied to clipboard
Is it possible to provide a command like 'npm config set' to permanently modify the node installation path of fnm
I'm using fnm on windows powershell
I've checked all the fnm documentation and issues, but can't find a way to permanently modify $FNM_DIR
.
Now I am adding the following code to the environment file $PROFILE in powershell to permanently modify the node installation path (in powershell only).
$env:FNM_DIR="D:\applications\fnm-windows\nodejs\"
fnm env --use-on-cd | Out-String | Invoke-Expression
Maybe I'm missing something, is there an official fnm method like 'fnm env set' to permanently modify these env var
? If not, will it be available in the future?
additionally, you need to set Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned.
😫
I dont believe its possible for a process to permanently modify the env vars of its parent process. Any changes made within the process will be lost once the app finishes running. iirc theres the setx
or set
command for windows but none for linux/mac or other platforms. At most what fnm could do is edit the .bashrc
or ps profile files itself to persist changes, thats the same as what you can do by hand.