From 028a50df6f8e9b2de9562a0096f3f0d65b1c8c96 Mon Sep 17 00:00:00 2001 From: TitanSnow Date: Fri, 26 May 2017 20:59:50 +0800 Subject: fix ForEach --- scripts/getpb.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/getpb.ps1 b/scripts/getpb.ps1 index 16042bb85..f62c3d122 100644 --- a/scripts/getpb.ps1 +++ b/scripts/getpb.ps1 @@ -35,7 +35,7 @@ Function Get-AppVeyorArtifacts{ }else{ $job = 0 } - Write-Output $obj.builds | ForEach-Object { + ForEach($_ in $obj.builds){ $jobId = $_.jobs[$job].jobId $artifacts = Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts" -Headers $headers $artifactFileName = $artifacts[0].fileName -- cgit v1.3.1