Skip to content

Commit

Permalink
fix(vsts): Fix expression for evaluating local package availabilityfo…
Browse files Browse the repository at this point in the history
…r testing
  • Loading branch information
abhipsaMisra committed Aug 17, 2020
1 parent 5fa191d commit 73dfc29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Function CheckTools($commands)

Function CheckLocalPackagesAvailableForTesting()
{
$localPackagesAvailableForTesting = (-not [string]::IsNullOrWhiteSpace($env:AZURE_IOT_LOCALPACKAGES))
return (-not [string]::IsNullOrWhiteSpace($env:AZURE_IOT_LOCALPACKAGES))
}

Function BuildProject($path, $message)
Expand Down Expand Up @@ -216,13 +216,14 @@ $localPackages = Join-Path $rootDir "bin\pkg"
$startTime = Get-Date
$buildFailed = $true
$errorMessage = ""
$localPackagesAvailableForTesting = $false
$localPackagesAvailableForTesting = CheckLocalPackagesAvailableForTesting

Write-Host -ForegroundColor Magenta "Local packages being used for testing: $localPackagesAvailableForTesting"

try
{
if ($sign)
{
CheckLocalPackagesAvailableForTesting
if ($localPackagesAvailableForTesting)
{
throw "Local NuGet package source path is not set, required when signing packages."
Expand Down

0 comments on commit 73dfc29

Please sign in to comment.