fix(validation): suppress ANSI color in bundling-failure annotation - #414
Merged
hdamker merged 1 commit intoAug 7, 2026
Merged
Conversation
GitHub Actions sets GITHUB_ACTIONS unconditionally, which redocly's color
library treats as reason enough to force color even on captured (non-TTY)
output. The resulting trailing color-reset line clobbered the
${err##*$'\n'} extraction, showing only "[39m" instead of the real message
— verified against a real runner, not local simulation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
bug
What this PR does / why we need it:
When a spec fails to bundle, codeowners currently see a warning like
Bundling failed for <spec>.yaml: [39m— a stray color-code fragment instead of Redocly's actual error message, with no clue what's actually wrong with their spec.Redocly forces color into its output on GitHub Actions runners even though this step only captures the output and never displays it directly; the trailing color-reset code was overwriting the real error message before it reached the annotation. Adding
NO_COLOR: "1"to the step stops Redocly from emitting color in the first place, so the annotation now shows the actual bundling error.Verified on a real GitHub Actions run, not just locally — a previous attempt at this same fix only worked in local testing and hadn't been confirmed against the real runner.
Which issue(s) this PR fixes:
Related to #390 (closed on narrower grounds without landing the annotation fix investigated there).
Special notes for reviewers:
No test suite covers this workflow step directly; verification was a live Actions run against a spec with an unresolved
$ref, confirming the annotation now shows Redocly's real message end-to-end.Changelog input
Additional documentation
This section can be blank.