mirror of
https://git.bits.team/Bits/mod-manager.git
synced 2024-11-23 22:48: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
|
# Verify compatible version of node is installed
|
||||||
info "Verifying node verison..."
|
info "Verifying node verison..."
|
||||||
NODE_VERSION_STR=$(node --version) || exit
|
NODE_VERSION_STR=$(node --version)
|
||||||
if [[ "$?" -eq 127 ]]
|
if [[ "$?" -eq 127 ]]
|
||||||
then
|
then
|
||||||
error "Node does not appear to be installed. Please install Node version $MIN_NODE_VERSION or higher"
|
error "Node does not appear to be installed. Please install Node version $MIN_NODE_VERSION or higher"
|
||||||
exit
|
exit
|
||||||
fi
|
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//")
|
NODE_VERSION=$( (echo $NODE_VERSION_STR | sed 's/\..*//') | sed "s/v//")
|
||||||
if [[ "$NODE_VERSION" -ge "$MIN_NODE_VERSION" ]]
|
if [[ "$NODE_VERSION" -ge "$MIN_NODE_VERSION" ]]
|
||||||
|
Loading…
Reference in New Issue
Block a user