Added check for empty $nugetArtifacts (#2817)

When the build fails there are no $nugetArtifacts, so AddRange fails
This commit is contained in:
Aditya Patwardhan 2016-12-01 12:58:14 -08:00 committed by Sergei Vorobev
parent 5484b98a7a
commit 19c709b986

View file

@ -441,7 +441,11 @@ function Invoke-AppveyorFinish
}
$nugetArtifacts = Get-ChildItem .\nuget-artifacts -ErrorAction SilentlyContinue | ForEach-Object { $_.FullName }
$artifacts.AddRange($nugetArtifacts)
if($nugetArtifacts)
{
$artifacts.AddRange($nugetArtifacts)
}
$pushedAllArtifacts = $true
$artifacts | ForEach-Object {