Remove nodejs install if it exists
This commit is contained in:
parent
f4137c28d1
commit
2d2e7360c0
|
@ -149,6 +149,14 @@ function install_nodejs {
|
|||
echo "deb-src https://deb.nodesource.com/node_6.x jessie main" >> /etc/apt/sources.list.d/nodesource.list
|
||||
|
||||
apt-get update
|
||||
|
||||
if [ -f /usr/bin/nodejs ]; then
|
||||
apt-get -yq remove --purge nodejs
|
||||
fi
|
||||
if [ -d /usr/local/lib/node_modules ]; then
|
||||
rm -rf /usr/local/lib/node_modules
|
||||
fi
|
||||
|
||||
apt-get -yq install nodejs curl
|
||||
|
||||
if [ ! -f /usr/bin/nodejs ]; then
|
||||
|
|
Loading…
Reference in New Issue