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

Correctly work __has_colors check in bin/crystal #4751

Merged

Conversation

makenowjust
Copy link
Contributor

@makenowjust makenowjust commented Jul 27, 2017

It shows Using compiled compiler at `.build/crystal' with colors even though TERM=dumb ./bin/crystal (dumb is a name which is one of the terminal names not to support colors.), so this is buggy.

In fact, this bug was pinpointed in #4499. I believe this is merged quickly.

@makenowjust makenowjust changed the title Correctly work __has_color check in bin/crystal Correctly work __has_colors check in bin/crystal Jul 27, 2017
@makenowjust
Copy link
Contributor Author

@ysbaddaden could you merge (or review) this?

@ysbaddaden
Copy link
Contributor

Merging, even though I have no idea how it works.

@ysbaddaden ysbaddaden merged commit f387380 into crystal-lang:master Jul 31, 2017
@makenowjust makenowjust deleted the fix/work-has-colors-correctly branch July 31, 2017 07:54
@makenowjust
Copy link
Contributor Author

Thank you @ysbaddaden

@RX14
Copy link
Contributor

RX14 commented Jul 31, 2017

@ysbaddaden bash ifworks by checking the return code of the command. This code tried to save the stdout of the __has_colours and use it as the if condition, which was incorrect.

I might be wrong though, my bash is a little rusty.

@ysbaddaden ysbaddaden added this to the Next milestone Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants