fix(fnm): use fnm lazy loader for node/npm/pnpm

This commit is contained in:
2025-12-01 11:39:37 +02:00
parent 2b1b341624
commit 42c704ea31

View File

@@ -71,6 +71,27 @@ if [[ -f $(which fnm) ]]; then
eval "$(command fnm env)"
fnm "$@"
}
npm() {
unset -f npm
if [[ -z $(fnm current) ]]; then
fnm default lts-latest
fi
npm "$@"
}
pnpm() {
unset -f pnpm
if [[ -z $(fnm current) ]]; then
fnm default lts-latest
fi
pnpm "$@"
}
node() {
unset -f node
if [[ -z $(fnm current) ]]; then
fnm default lts-latest
fi
node "$@"
}
fi
# SurrealDB