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

feat: add color to github actions output #94

Merged
merged 2 commits into from
May 19, 2022

Conversation

kevin-s31
Copy link
Contributor

Added the FORCE_COLOR environment variable and set it to true to see a colored output for a snyk test in github actions

@kevin-s31 kevin-s31 requested a review from a team as a code owner May 13, 2022 15:18
setup/setup_snyk.sh Outdated Show resolved Hide resolved
@garethr
Copy link
Collaborator

garethr commented May 13, 2022

Note I think supports-color uses the following. Not sure if True works, or works as well as for instance 2 or 3?

If FORCE_COLOR is "0" or "false" then force plain, uncolored output
If FORCE_COLOR is "1" or "true" then force 16 color ANSI output
If FORCE_COLOR is "2" then force 256 color ANSI output
If FORCE_COLOR is "3" then force full 24-bit RGB output

Might be worth trying out, and posting a screenshot of it working in this PR to demonstrate this works as intended?

@kevin-s31
Copy link
Contributor Author

kevin-s31 commented May 13, 2022

Removed the space after the variable and also instead of True, set it to 2 to allow for 256 color ANSI output. Screenshot attached

Screen Shot 2022-05-16 at 11 25 18 AM

Screen Shot 2022-05-16 at 11 28 02 AM

Copy link
Contributor

@bastiandoetsch bastiandoetsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bastiandoetsch bastiandoetsch merged commit f62eba3 into snyk:master May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants