@@ -204,24 +204,27 @@ function DockerValidation{
204
204
[string ]$workingDirectory
205
205
)
206
206
if ($PackageSourceOverride ) {
207
- docker run - v " ${workingDirectory} :/workdir/out" - e TARGET_PACKAGE= $packageName - e TARGET_VERSION= $packageVersion `
208
- - e EXTRA_INDEX_URL= $PackageSourceOverride - t $DocValidationImageId 2>&1 | Out-Null
207
+ Write-Host " docker run -v ${workingDirectory} :/workdir/out -e TARGET_PACKAGE=$packageName -e TARGET_VERSION=$packageVersion -e EXTRA_INDEX_URL=$PackageSourceOverride -t $DocValidationImageId "
208
+ $commandLine = docker run - v " ${workingDirectory} :/workdir/out" - e TARGET_PACKAGE= $packageName - e TARGET_VERSION= $packageVersion `
209
+ - e EXTRA_INDEX_URL= $PackageSourceOverride - t $DocValidationImageId 2>&1
209
210
}
210
211
else {
211
- docker run - v " ${workingDirectory} :/workdir/out" `
212
- - e TARGET_PACKAGE= $packageName - e TARGET_VERSION= $packageVersion - t $DocValidationImageId 2>&1 | Out-Null
212
+ Write-Host " docker run -v ${workingDirectory} :/workdir/out -e TARGET_PACKAGE=$packageName -e TARGET_VERSION=$packageVersion -t $DocValidationImageId "
213
+ $commandLine = docker run - v " ${workingDirectory} :/workdir/out" `
214
+ - e TARGET_PACKAGE= $packageName - e TARGET_VERSION= $packageVersion - t $DocValidationImageId 2>&1
213
215
}
214
216
# The docker exit codes: https://docs.docker.com/engine/reference/run/#exit-status
215
217
# If the docker failed because of docker itself instead of the application,
216
218
# we should skip the validation and keep the packages.
219
+
217
220
if ($LASTEXITCODE -eq 125 -Or $LASTEXITCODE -eq 126 -Or $LASTEXITCODE -eq 127 ) {
218
- Write-Host $commandLine
221
+ $commandLine | ForEach-Object { Write-Debug $_ }
219
222
LogWarning " The `docker` command does not work with exit code $LASTEXITCODE . Fall back to npm install $packageName directly."
220
223
FallbackValidation - packageName " $packageName " - packageVersion " $packageVersion " - workingDirectory $workingDirectory - PackageSourceOverride $PackageSourceOverride
221
224
}
222
225
elseif ($LASTEXITCODE -ne 0 ) {
223
- Write-Host $commandLine
224
- LogWarning " Package $ ( $Package .name ) ref docs validation failed."
226
+ $commandLine | ForEach-Object { Write-Debug $_ }
227
+ LogWarning " Package $packageName ref docs validation failed."
225
228
return $false
226
229
}
227
230
return $true
@@ -566,4 +569,4 @@ function Validate-Python-DocMsPackages ($PackageInfo, $PackageSourceOverride, $D
566
569
$packageVersion = $packageInfo.Version
567
570
ValidatePackage - packageName $packageName - packageVersion $packageVersion `
568
571
- PackageSourceOverride $PackageSourceOverride - DocValidationImageId $DocValidationImageId
569
- }
572
+ }
0 commit comments