Skip to content

Commit b4eee12

Browse files
raych1azure-sdk
authored andcommitted
Prioritized service directory from artifact object over the parameter input
1 parent 0a0b873 commit b4eee12

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

eng/common/scripts/SetTestPipelineVersion.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,16 @@ if ($Artifacts -and $Artifacts.Count -gt 0) {
3939
exit 1
4040
}
4141

42-
# Check for ServiceDirectory property
43-
$artifactServiceDirectory = $ServiceDirectory
42+
# Check for ServiceDirectory property
4443
if (Get-Member -InputObject $artifact -Name 'ServiceDirectory' -MemberType Properties) {
4544
if (![String]::IsNullOrWhiteSpace($artifact.ServiceDirectory)) {
4645
$artifactServiceDirectory = $artifact.ServiceDirectory
4746
}
4847
}
48+
49+
if ([String]::IsNullOrWhiteSpace($artifactServiceDirectory)) {
50+
$artifactServiceDirectory = $ServiceDirectory
51+
}
4952

5053
# Validate ServiceDirectory is available
5154
if ([String]::IsNullOrWhiteSpace($artifactServiceDirectory)) {

0 commit comments

Comments
 (0)