Skip to content

Fix TTY colors #18

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

Merged
merged 1 commit into from
Nov 26, 2019
Merged

Fix TTY colors #18

merged 1 commit into from
Nov 26, 2019

Conversation

dduan
Copy link
Collaborator

@dduan dduan commented Nov 26, 2019

The change from #13 actually
disabled coloring when output device is a TTY device.

Excerpt from BSD manual for isatty:

RETURN VALUES
     The isatty() function returns 1 if fd refers to a terminal type
     device; otherwise, it returns 0 and may set errno to indicate the
     error.

Double negative is hard. 🤦‍♀️

Anyways.

The change from #13 actually
disabled coloring when output device is a TTY device.

Excerpt from BSD manual for `isatty`:

```
RETURN VALUES
     The isatty() function returns 1 if fd refers to a terminal type
     device; otherwise, it returns 0 and may set errno to indicate the
     error.
```

Double negative is hard. 🤦‍♀️

Anyways.
@dduan dduan merged commit af177ee into master Nov 26, 2019
@dduan dduan deleted the restore-colors branch November 26, 2019 01:16
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.

1 participant