Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors="always" is always in the command arguments and when overwritten to never generates a warning and exit code 1 #72

Open
MatthewYKnowles opened this issue Mar 20, 2025 · 2 comments

Comments

@MatthewYKnowles
Copy link

I am trying to output my coverage results without colors so they can be easy to add as a comment to PR without the special characters that come from adding color. When I pass --colors=never to the args it does work because its appended to the end of the command arguments and the earlier colors="always" is overwritten. The problem is there is a warning that you shouldn't do the same command line argument twice and the step fails with an exit code of 1.

There was 1 PHPUnit test runner warning:

  1. Option --colors cannot be used more than once

Would be possible to add Colors as a configurable value?

@g105b
Copy link
Member

g105b commented Mar 24, 2025

Sure thing! I've got 5 mins so I'll make this adjustment now.

g105b pushed a commit that referenced this issue Mar 24, 2025
@g105b
Copy link
Member

g105b commented Mar 24, 2025

Hi @MatthewYKnowles I've just made a PR to fix your issue. Please can you test this by changing your workflow to:

uses: php-actions/phpunit@colors

And then add the config attribute:

colors: never

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants