fnm
fnm copied to clipboard
manually set a node install directory location
Hi,
Is there a way to configure the location of fnm's installation of node?
This use case is related to developer tooling exclusions for microsoft defender. Having the option to specify a path would allow for the node install to be automatically added to our exclusion list.
Yes! All the installations and data is stored in the directory $FNM_DIR env var is pointing to. An easy way to set it can be done by adding a --fnm-dir="..."
to the fnm env
call.
@Schniz Hi, I've set $FNM_DIR but the installs still takes place in the default directory from fnm env
$env:FNM_MULTISHELL_PATH = "C:\Users\i_am_\AppData\Local\fnm_multishells\18836_1645547820612"
$env:FNM_VERSION_FILE_STRATEGY = "local"
$env:FNM_DIR = "D:\Code\System\fnm"
$env:FNM_LOGLEVEL = "info"
$env:FNM_NODE_DIST_MIRROR = "https://nodejs.org/dist"
$env:FNM_ARCH = "x64"
I would have presumed FNM_MULTISHELL_PATH would have pointed to a directory relative to FNM_DIR.
It is not, as the multishell is an ephemeral resource (a shell session-specific symlink)
ah ok, thank you. My D: drive is a different disk. Is there a way to modify the default root for FNM_MULTISHELL_PATH? I would have preferred if every file was kept on the same drive.
There's no way to provide that. But we might have a way in the near future.