OSDN Git Service

Add -UseBasicParsing option to Invoke-WebRequest
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 22 Jan 2023 00:38:54 +0000 (09:38 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 22 Jan 2023 00:38:54 +0000 (09:38 +0900)
Plugins/Commands/q/q.bat
Plugins/Commands/yq/yq.bat

index 5dcef7b..2dea423 100644 (file)
@@ -27,7 +27,7 @@ if not exist %Q_PATH% (
     if errorlevel 1 (
       echo "download is canceled" 1>&2
     ) else (
-      start "Downloading..." /WAIT powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %DOWNLOAD_URL% -Outfile %Q_PATH%"
+      start "Downloading..." /WAIT powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri %DOWNLOAD_URL% -UseBasicParsing -Outfile %Q_PATH%"
       powershell -command "$(CertUtil -hashfile %Q_PATH% SHA256)[1] -replace ' ','' -eq '%SHA256%'" | findstr True > NUL
       if errorlevel 1 (
         echo %Q_PATH%: download failed 1>&2
index 5d6084c..1a1fde9 100644 (file)
@@ -17,7 +17,7 @@ if not exist %YQ_PATH% (
     if errorlevel 1 (
       echo "download is canceled" 1>&2
     ) else (
-      start "Downloading..." /WAIT powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %DOWNLOAD_URL% -Outfile %YQ_PATH%"
+      start "Downloading..." /WAIT powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri %DOWNLOAD_URL% -UseBasicParsing -Outfile %YQ_PATH%"
       powershell -command "$(CertUtil -hashfile %YQ_PATH% SHA256)[1] -replace ' ','' -eq '%SHA256%'" | findstr True > NUL
       if errorlevel 1 (
         echo %YQ_PATH%: download failed 1>&2