Always try to uninstall nodejs before installing it
This commit is contained in:
parent
a5fe0462de
commit
5d61b29d95
|
@ -149,9 +149,8 @@ function install_nodejs {
|
|||
|
||||
apt-get update
|
||||
|
||||
if [ -f /usr/bin/nodejs ]; then
|
||||
apt-get -yq remove --purge nodejs
|
||||
fi
|
||||
apt-get -yq remove --purge nodejs
|
||||
|
||||
if [ -d /usr/local/lib/node_modules ]; then
|
||||
rm -rf /usr/local/lib/node_modules
|
||||
fi
|
||||
|
@ -165,7 +164,8 @@ function install_nodejs {
|
|||
rm /usr/bin/nodejs
|
||||
fi
|
||||
|
||||
apt-get -yq install nodejs curl
|
||||
apt-get -yq install nodejs
|
||||
apt-get -yq install curl
|
||||
|
||||
if [ ! -f /usr/bin/nodejs ]; then
|
||||
echo $'nodejs was not installed'
|
||||
|
|
Loading…
Reference in New Issue