stop on BITS download errors
reject 0 byte dsa-collector.exe before launching
This commit is contained in:
@@ -60,6 +60,9 @@ If ( [string]::IsNullOrWhiteSpace([string]$DsaDownloadedFile) -or
|
||||
!(Test-Path -LiteralPath $DsaExecutablePath -PathType Leaf) ) {
|
||||
Throw "Failed to download dsa-collect.exe to ${DsaExecutablePath}"
|
||||
}
|
||||
If ( (Get-Item -LiteralPath $DsaExecutablePath -ErrorAction Stop).Length -eq 0 ) {
|
||||
Throw "The downloaded dsa-collect.exe is 0 bytes: ${DsaExecutablePath}. The collector was not started. Check the download response and client TLS/BITS settings."
|
||||
}
|
||||
|
||||
$DsaArguments = @('--source', [string]$DSAManifestSource, '--output', [string]$DSAManifestOutput)
|
||||
If ( $DsaZipEnabled ) {
|
||||
|
||||
Reference in New Issue
Block a user