Fix npm version 7.17.0 will give errors.

pull/1892/head
Eric-Guo 2021-06-11 16:27:12 +08:00
parent 2444a57cc5
commit 574534f8c1
1 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ npm-disable-proxy ()
if $(command -v npm &> /dev/null) ; then if $(command -v npm &> /dev/null) ; then
npm config delete proxy npm config delete proxy
npm config delete https-proxy npm config delete https-proxy
npm config delete noproxy npm config delete no_proxy
echo "Disabled npm proxy settings" echo "Disabled npm proxy settings"
fi fi
} }
@ -150,7 +150,7 @@ npm-enable-proxy ()
if $(command -v npm &> /dev/null) ; then if $(command -v npm &> /dev/null) ; then
npm config set proxy $my_http_proxy npm config set proxy $my_http_proxy
npm config set https-proxy $my_https_proxy npm config set https-proxy $my_https_proxy
npm config set noproxy $my_no_proxy npm config set no_proxy $my_no_proxy
echo "Enabled npm proxy settings" echo "Enabled npm proxy settings"
fi fi
} }