Skip to content

Commit

Permalink
install npm if missing
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Storm <markus.storm@gmx.net>
  • Loading branch information
mstormi committed Feb 10, 2024
1 parent 12f85cb commit 634356c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions/nodejs-apps.bash
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ nodejs_setup() {
if cond_redirect apt-get install --yes -o DPkg::Lock::Timeout="$APTTIMEOUT" nodejs; then echo "OK"; else echo "FAILED"; return 1; fi
fi
#if [[ "$myDistro" == "bookworm" ]]; then jsscripting_npm_install; fi
if ! command -v npm; &> /dev/null; then jsscripting_npm_install; fi
if ! command -v npm &> /dev/null; then
echo -n "$(timestamp) [openHABian] Installing npm ... "
if cond_redirect apt-get install --yes -o DPkg::Lock::Timeout="$APTTIMEOUT" npm; then echo "OK"; else echo "FAILED (install npm)"; return 1; fi
fi
fi
}

Expand Down

0 comments on commit 634356c

Please sign in to comment.