-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Add isTTY function #1622
Add isTTY function #1622
Conversation
I think this should take the file as an argument, either file.isTTY or isTTY(file), specifically you may want to be able to see if stdout or stderr is a tty. Note: You can use atty for this, I think there's no need to use libc/unsafe. |
Needs tests. Probably custom tests written in python... |
Are stdin, stdout and stderr the only files that can be TTY? |
Will do! |
@ry thanks for help, I've fixed all problems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now - thanks!
- Add deps to --info output (denoland#1720) - Add --allow-read (denoland#1689) - Add deno.isTTY() (denoland#1622) - Add emojis to permission prompts (denoland#1684) - Add basic WebAssembly support (denoland#1677) - Add `NO_COLOR` support https://no-color.org/ (denoland#1716) - Add color exceptions (denoland#1698) - Fix: do not load cache files when recompile flag is set (denoland#1695) - Upgrade V8 to 7.4.98 (denoland#1640)
- Add deps to --info output (#1720) - Add --allow-read (#1689) - Add deno.isTTY() (#1622) - Add emojis to permission prompts (#1684) - Add basic WebAssembly support (#1677) - Add `NO_COLOR` support https://no-color.org/ (#1716) - Add color exceptions (#1698) - Fix: do not load cache files when recompile flag is set (#1695) - Upgrade V8 to 7.4.98 (#1640)
Fixes #1607.
To test run in REPL: