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

Color-always on grep breaks CircleCI (and possibly other bash scripts) #29

Open
sdspikes opened this issue Oct 16, 2017 · 1 comment
Open

Comments

@sdspikes
Copy link

export GREP_OPTIONS='--color=always'

If you have a bash script (like CircleCI's CLI: https://circle-downloads.s3.amazonaws.com/releases/build_agent_wrapper/circleci) that redirects the grep output into a file, you get escape characters for the coloring in the file, which in this case, broke the script in a very non-obvious way.

@vcolavin
Copy link

vcolavin commented Jun 27, 2018

I ran into this today. Here's a fix that lets you still have colors:

export GREP_OPTIONS='--color=auto'

This won't output the color character if in a non-interactive environment.

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

No branches or pull requests

2 participants