From f8bca784b9e8a13b7edc81438aa28842e6df763f Mon Sep 17 00:00:00 2001 From: fabrice1236 Date: Tue, 7 Jan 2025 18:58:06 +0100 Subject: [PATCH] Add npm installation check to Ghost installation script --- install/ghost-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install/ghost-install.sh b/install/ghost-install.sh index f08ffd78..7e2b85e1 100644 --- a/install/ghost-install.sh +++ b/install/ghost-install.sh @@ -46,6 +46,13 @@ msg_ok "Set up Node.js Repository" # Install Node.js (includes npm) msg_info "Installing Node.js" $STD apt-get install -y nodejs +if ! command -v npm &> /dev/null; then + msg_info "Installing npm" + $STD apt-get install -y npm + msg_ok "Installed npm" +else + msg_ok "npm is already installed" +fi msg_ok "Installed Node.js" # Install Ghost CLI