Skip to content

Commit 1ae4e34

Browse files
Copilotjohlju
andcommitted
Remove exit codes and set proper Azure DevOps output variable
Co-authored-by: johlju <7189721+johlju@users.noreply.github.com>
1 parent d89602a commit 1ae4e34

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

.build/Test-ShouldRunDscResourceIntegrationTests.ps1

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,6 @@ if ($MyInvocation.InvocationName -ne '.')
481481
{
482482
$shouldRun = Test-ShouldRunDscResourceIntegrationTests -BaseBranch $BaseBranch -CurrentBranch $CurrentBranch
483483

484-
# Output result for Azure DevOps variables
485-
Write-Output -InputObject "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests]$shouldRun"
486-
487484
# Provide clear final result with appropriate color coding
488485
Write-Host "##[section]Test Requirements Decision"
489486
if ($shouldRun)
@@ -495,17 +492,10 @@ if ($MyInvocation.InvocationName -ne '.')
495492
Write-Host "RESULT: DSC resource integration tests will be SKIPPED"
496493
}
497494

495+
# Set Azure DevOps output variable for pipeline conditions
496+
Write-Host "##vso[task.setvariable variable=ShouldRunDscResourceIntegrationTests;isOutput=true]$shouldRun"
497+
498498
# Also output as regular output for local testing
499499
Write-Output -InputObject ""
500500
Write-Output -InputObject "ShouldRunDscResourceIntegrationTests: $shouldRun"
501-
502-
# Set exit code based on result for script usage
503-
if ($shouldRun)
504-
{
505-
exit 0
506-
}
507-
else
508-
{
509-
exit 1
510-
}
511501
}

0 commit comments

Comments
 (0)