service.bat: make curl fail in case of errors (#17232)

This commit is contained in:
Yevgeny Kungurov authored and GitHub committed 2026-09-20 11:29:14 +03:00
1 parent eebc6b1358
commit 344e8a6661
1 file changed
+3 -3
+3 -3
View File
@@ -1116,9 +1116,9 @@ echo Updating ipset-all...
if exist "%SystemRoot%\System32\curl.exe" ( if exist "%SystemRoot%\System32\curl.exe" (
curl --version | find "libcurl/7" curl --version | find "libcurl/7"
if !errorlevel!==0 ( if !errorlevel!==0 (
curl --ssl-no-revoke -L -o "%listFile%" "%url%" curl --ssl-no-revoke -L -f -o "%listFile%" "%url%"
) else ( ) else (
curl --ssl-revoke-best-effort -L -o "%listFile%" "%url%" curl --ssl-revoke-best-effort -L -f -o "%listFile%" "%url%"
) )
) else ( ) else (
powershell -NoProfile -Command ^ powershell -NoProfile -Command ^
@@ -1152,7 +1152,7 @@ set "requestUrl=%hostsUrl%?t=%cacheBuster%"
echo Checking hosts file... echo Checking hosts file...
if exist "%SystemRoot%\System32\curl.exe" ( if exist "%SystemRoot%\System32\curl.exe" (
curl -L -s -o "%tempFile%" "%requestUrl%" curl -L -s -f -o "%tempFile%" "%requestUrl%"
) else ( ) else (
powershell -NoProfile -Command ^ powershell -NoProfile -Command ^
"$url = '%requestUrl%';" ^ "$url = '%requestUrl%';" ^