From 21a224352c8b84352d75ced5da0a9af0bf57329d Mon Sep 17 00:00:00 2001 From: Robert Gildein Date: Sat, 18 Apr 2026 22:02:06 +0200 Subject: [PATCH] bug: Fix install script The installation script failed to check if fnm binary is installed. closes #12173 Signed-off-by: Robert Gildein --- extensions/cli/scripts/install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/cli/scripts/install.sh b/extensions/cli/scripts/install.sh index c531d69e955..8fd0902c9a5 100644 --- a/extensions/cli/scripts/install.sh +++ b/extensions/cli/scripts/install.sh @@ -179,8 +179,8 @@ check_node() { } install_node() { - # Only mark for cleanup if fnm directory doesn't already exist - if [ ! -d "$FNM_INSTALL_DIR" ]; then + # Only mark for cleanup if fnm isn't already available + if ! command -v fnm &>/dev/null; then CLEANUP_FNM=true fi info "Installing fnm (Fast Node Manager)..." @@ -191,12 +191,12 @@ install_node() { error "Failed to install fnm. Check your network connection and try again." fi - if [ ! -x "$FNM_INSTALL_DIR/fnm" ]; then - error "fnm installation failed - binary not found at $FNM_INSTALL_DIR/fnm" - fi - export PATH="$FNM_INSTALL_DIR:$PATH" + if ! command -v fnm &>/dev/null; then + error "fnm installation failed - binary not found" + fi + # Initialize fnm for current session if ! eval "$(fnm env --shell bash 2>/dev/null)"; then error "Failed to initialize fnm environment"