git.ps1: Don't use proxy if it's set to "none"

This commit is contained in:
Richard Kuhnt
2019-03-18 15:16:10 +01:00
parent d157d6f11d
commit 10d191a4b1
+1 -1
View File
@@ -1,7 +1,7 @@
function git_proxy_cmd {
$proxy = $(scoop config proxy)
$cmd = "git $($args | ForEach-Object { "$_ " })"
if($proxy) {
if($proxy -and $proxy -ne 'none') {
$cmd = "SET HTTPS_PROXY=$proxy&&SET HTTP_PROXY=$proxy&&$cmd"
}
& "$env:COMSPEC" /c $cmd