Skip to content

Commit b2529a1

Browse files
Copilotmarkphip
andcommitted
Add clarifying comments about return codes and warnings
Co-authored-by: markphip <[email protected]>
1 parent 8944e2f commit b2529a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/artifacts-helper/scripts/auth-ado.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ while [ $ELAPSED -lt $MAX_WAIT ]; do
3333
log_step "Running ado-auth-helper get-access-token..."
3434
ARTIFACTS_ACCESSTOKEN=$(${HOME}/ado-auth-helper get-access-token)
3535
log_step "✓ Access token retrieved successfully"
36+
# Return 0 to indicate successful authentication
3637
return 0
3738
fi
3839
sleep 2
@@ -45,8 +46,9 @@ while [ $ELAPSED -lt $MAX_WAIT ]; do
4546
done
4647

4748
# Timeout reached - continue without authentication
48-
# Always show warnings, even if verbose is disabled
49+
# Always show timeout warnings regardless of verbose setting, as this indicates a potential issue
4950
echo "::warning::AzDO Authentication Helper not found after ${MAX_WAIT} seconds"
5051
echo "Expected location: ${HOME}/ado-auth-helper"
5152
echo "Continuing without Azure Artifacts authentication..."
53+
# Return 1 to indicate authentication was not successful, but don't exit (allow sourcing script to continue)
5254
return 1

0 commit comments

Comments
 (0)