Skip to content
Snippets Groups Projects
Commit c23cd4ae authored by Bob Mottram's avatar Bob Mottram
Browse files

Check multiple possible nodes

parent be43cf38
No related branches found
No related tags found
No related merge requests found
......@@ -98,16 +98,25 @@ function mesh_install_nodejs {
fi
$mesh_install_nodejs_prefix apt-get -yq install nodejs
if [ ! -f ${rootdir}/usr/bin/nodejs ]; then
echo $'nodejs was not installed'
exit 63962
CURR_NODE_VERSION=$(node --version)
if [[ "$CURR_NODE_VERSION" != "v${NODEJS_VERSION}" ]]; then
echo $"Expected node version $NODEJS_VERSION but actually have $CURR_NODE_VERSION"
exit 5274527
fi
if [ -f $rootdir/usr/bin/nodejs ]; then
cp $rootdir/usr/bin/nodejs $rootdir/usr/bin/node
fi
if [ ! -f ${rootdir}/usr/bin/node ]; then
if [ ! -f ${rootdir}/usr/local/bin/node ]; then
if [ ! -f ${rootdir}/usr/bin/nodejs ]; then
echo $'nodejs was not installed'
exit 63962
fi
fi
fi
if [ ! -f $rootdir/usr/bin/node ]; then
echo $'/usr/bin/node not found'
exit 7235728
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment