Add passThru

This commit is contained in:
Calyx Hikari 2025-07-03 12:29:58 +08:00
parent 9879277784
commit a7ffeac9db
4 changed files with 4 additions and 4 deletions

2
32
View file

@ -110,7 +110,7 @@ function Main {
if (![string]::IsNullOrEmpty($regionalWorkaround)) {
$argumentList += $regionalWorkaround
}
$proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
$proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -PassThru -Wait
if ($proc.ExitCode -ne 0) {
Write-Warning "aria2c failed (exit code $($proc.ExitCode)). Retrying with --check-certificate=false..."
$argsRetry = $argumentList + "--check-certificate=false"

2
64
View file

@ -131,7 +131,7 @@ function Main {
if (![string]::IsNullOrEmpty($regionalWorkaround)) {
$argumentList += $regionalWorkaround
}
$proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
$proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -PassThru -Wait
if ($proc.ExitCode -ne 0) {
Write-Warning "aria2c failed (exit code $($proc.ExitCode)). Retrying with --check-certificate=false..."
$argsRetry = $argumentList + "--check-certificate=false"

2
dx
View file

@ -107,7 +107,7 @@ function Main {
if (![string]::IsNullOrEmpty($regionalWorkaround)) {
$argumentList += $regionalWorkaround
}
$proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
$proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -PassThru -Wait
if ($proc.ExitCode -ne 0) {
Write-Warning "aria2c failed (exit code $($proc.ExitCode)). Retrying with --check-certificate=false..."
$argsRetry = $argumentList + "--check-certificate=false"

View file

@ -130,7 +130,7 @@ function Main {
if (![string]::IsNullOrEmpty($regionalWorkaround)) {
$argumentList += $regionalWorkaround
}
$proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
$proc = Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -PassThru -Wait
if ($proc.ExitCode -ne 0) {
Write-Warning "aria2c failed (exit code $($proc.ExitCode)). Retrying with --check-certificate=false..."
$argsRetry = $argumentList + "--check-certificate=false"