-
-
Notifications
You must be signed in to change notification settings - Fork 904
Description
What happened?
Following the change in #9120, running biome ci now enables the github reporter when the environment contains GITHUB_ACTION=true. However, by default, biome ci still uses color output, which currently breaks the intended functionality.
Specifically, Biome's color output causes lines of github reporter output (written to stdout) to be wrapped with the characters 0x1b 0x5b 0x30 0x6d (or ESC[0m), which is the ANSI escape sequence to "reset all modes (styles and colors)". These extra characters breaks GitHub's ability to process such lines as workflow commands, which defeats the purpose of the github reporter.
Note, if the command is run as biome ci --reporter=default --reporter=github color output is disabled (due to #3281) and the output is correctly detected by GitHub. However, biome ci ought to "just work" too.
I think there are 2 potential fixes:
- Make
biome ci(whenGITHUB_ACTION=true) actually work the same as--reporter=default --reporter=github, which would effectively also set--colors=off, per fix(cli): disable colors when using the github reporterย #3281. - Ensure that the stdout output of the
githubhas "clean" lines with no ANSI control characters. I suspect that control characters could still technically be output by thegithubreporter (if colors needed to be reset), but they'd have to be on totally separate lines from the actual "workflow commands". Additionally, maybe part of fix(cli): disable colors when using the github reporterย #3281 could actually be reverted, so that when--reporter=default --reporter=githubis explicitly enabled, thedefaultreporter could still produce color output.
I think 2 would be the most user-friendly behavior. However, 1 seems easier and would only deprive users of colors when running inside GitHub Actions.
Code of Conduct
- I agree to follow Biome's Code of Conduct