WaelHamze / dyn365-ce-vsts-tasks

VSTS Extension for Dynamics 365 Customer Engagement
https://marketplace.visualstudio.com/items?itemName=WaelHamze.xrm-ci-framework-build-tasks
GNU General Public License v3.0
115 stars 54 forks source link

GetLatestPatch sets patch name variable as null #293

Open sstridsberg opened 11 months ago

sstridsberg commented 11 months ago

When running a pipeline and there is no patch, the task sets the patch name variable to null. If I want to set up a pipeline capable of running both with and without patches, this doesn't work.

If the task.setvariable moved to within the if-statement this would resolve the issue, or if a nulloremtpy is implemented on line 57:

if ([string]::IsNullOrEmpty($patchVariableName))
{
    Write-Host "##vso[task.setvariable variable=$patchVariableName]$name"
}