Skip to content

feat: add color to github actions output#94

Merged
bastiandoetsch merged 2 commits intosnyk:masterfrom
kevin-s31:feat/github-actions-color
May 19, 2022
Merged

feat: add color to github actions output#94
bastiandoetsch merged 2 commits intosnyk:masterfrom
kevin-s31:feat/github-actions-color

Conversation

@kevin-s31
Copy link
Copy Markdown
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
@garethr
Copy link
Copy Markdown
Contributor

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 kevin-s31 force-pushed the feat/github-actions-color branch from f99f0c8 to f921f15 Compare May 13, 2022 15:47
@kevin-s31 kevin-s31 force-pushed the feat/github-actions-color branch from 8e2ef0e to e554b82 Compare May 13, 2022 15:52
@kevin-s31
Copy link
Copy Markdown
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
Copy Markdown
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