-
Notifications
You must be signed in to change notification settings - Fork 612
Open
Description
Support for $XDG_DATA_HOME was added in a recent release, however it is not used under macOS and falls back to the default location ~/Library/Application Support.
fnm 1.29.1
mv ~/.fnm ~/.local/share/fnm
fnm env
# FNM_DIR -> ~/Library/Application Support/fnmHowever $XDG_DATA_HOME is respected under Linux.
# macOS
XDG_DATA_HOME=/tmp fnm env
# FNM_DIR -> ~/Library/Application Support/fnm
# Linux
XDG_DATA_HOME=/tmp fnm env
# FNM_DIR -> /tmp/fnm
The XDG_DATA_HOME environment variable should be used first if it is configured, and then fall back to the macOS location.
For example, the changes to the install script in Pull Request 614.
if [ -d "$HOME/.fnm" ]; then
INSTALL_DIR="$HOME/.fnm"
elif [ ! -z $XDG_DATA_HOME ]; then
INSTALL_DIR="$XDG_DATA_HOME/fnm"
elif [ "$OS" = "Darwin" ]; then
INSTALL_DIR="$HOME/Library/Application Support/fnm"
# ...
fiReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels