mirror of
https://git.bits.team/Bits/mod-manager.git
synced 2024-11-23 14:38:21 -05:00
Check npm is installed
This commit is contained in:
parent
2010b8dec9
commit
f26324d4f5
@ -36,13 +36,20 @@ mkdir -p "$DOWNLOAD_DIR" || exit
|
||||
|
||||
# Verify compatible version of node is installed
|
||||
info "Verifying node verison..."
|
||||
NODE_VERSION_STR=$(node --version) || exit
|
||||
NODE_VERSION_STR=$(node --version)
|
||||
if [[ "$?" -eq 127 ]]
|
||||
then
|
||||
error "Node does not appear to be installed. Please install Node version $MIN_NODE_VERSION or higher"
|
||||
exit
|
||||
fi
|
||||
|
||||
npm --version
|
||||
if [[ "$?" -eq 127 ]]
|
||||
then
|
||||
error "Npm does not appear to be installed. Please install npm and re run the installer"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
NODE_VERSION=$( (echo $NODE_VERSION_STR | sed 's/\..*//') | sed "s/v//")
|
||||
if [[ "$NODE_VERSION" -ge "$MIN_NODE_VERSION" ]]
|
||||
|
Loading…
Reference in New Issue
Block a user