[Ubuntu] remove --unsafe-perm code for netlify-cli (#4712)

This commit is contained in:
Marcel Gerber
2021-12-10 10:38:30 +01:00
committed by GitHub
parent 1fb7d122d1
commit 9d3fcffab4

View File

@@ -14,20 +14,7 @@ bash ~/n $defaultVersion
# Install node modules # Install node modules
node_modules=$(get_toolset_value '.node_modules[].name') node_modules=$(get_toolset_value '.node_modules[].name')
npm install -g $node_modules
# remove commenting out of this line as nmp migrated to v7
# npm install -g $node_modules
# TODO: workaround for Netlify CLI with npm6. Remove 19-28 and uncomment 17 if migration to npm7 compelted
for module in $node_modules; do
echo "Installing node module $module"
if [ $module = "netlify-cli" ];then
# Install the Netlify CLI using --unsafe-perm=true options to avoid permission issues
npm install -g --unsafe-perm=true $module
else
npm install -g $module
fi
done
echo "Creating the symlink for [now] command to vercel CLI" echo "Creating the symlink for [now] command to vercel CLI"
ln -s /usr/local/bin/vercel /usr/local/bin/now ln -s /usr/local/bin/vercel /usr/local/bin/now