From 43e5d5ed853ffeadac2e827b3c40ba72be8338c9 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Tue, 4 Aug 2026 22:29:51 +0100 Subject: [PATCH] Only load fnm sheldon plugin on macOS On the server, fnm isn't installed since system nodejs is used instead. The zsh-fnm plugin's own fallback silently curl-installs fnm when missing, and its --use-on-cd hook then prompts on every cd since no default version is fnm-managed there. Gate the plugin to Darwin only. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01G3jcSVn51hiw58f7jPWrpN --- sheldon.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sheldon.toml b/sheldon.toml index 3ea5b6a..dfce8a1 100644 --- a/sheldon.toml +++ b/sheldon.toml @@ -79,7 +79,14 @@ apply = ["defer"] [plugins.fnm] github = "dominik-schwabe/zsh-fnm" apply = ["defer"] -hooks.pre = 'export ZSH_FNM_ENV_EXTRA_ARGS="--use-on-cd --version-file-strategy recursive --resolve-engines false"' +# Linux boxes (e.g. the server) intentionally use the distro nodejs package +# instead of fnm, so only load this plugin on macOS. Otherwise the plugin's +# own fallback silently curl-installs fnm and its --use-on-cd hook then +# prompts on every cd since no version is fnm-managed there. +hooks.pre = ''' +if [[ "$OSTYPE" == darwin* ]]; then +export ZSH_FNM_ENV_EXTRA_ARGS="--use-on-cd --version-file-strategy recursive --resolve-engines false"''' +hooks.post = "fi" [plugins.zoxide] github = "ajeetdsouza/zoxide"