Skip to content

Lacking the counterpart of process.stdin.isTTY #30

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

Closed
matoruru opened this issue Mar 19, 2021 · 0 comments · Fixed by #31
Closed

Lacking the counterpart of process.stdin.isTTY #30

matoruru opened this issue Mar 19, 2021 · 0 comments · Fixed by #31

Comments

@matoruru
Copy link
Contributor

Hello maintainers,

I'm wondering it since I saw these functions, there already are stdoutIsTTY and stderrIsTTY but lacking stdinIsTTY.

I'm avoiding this lacking by defining my own one only for now:

stdinIsTTY :: Boolean
stdinIsTTY = (unsafeCoerce stdin).isTTY

and this seems working properly like this:

main :: Effect Unit
main = logShow stdinIsTTY
❯ spago run
[info] Build succeeded.
trueecho hi | spago run
[info] Build succeeded.
false
matoruru added a commit to matoruru/purescript-node-process that referenced this issue Mar 19, 2021
@matoruru matoruru mentioned this issue Mar 19, 2021
4 tasks
thomashoneyman added a commit that referenced this issue Mar 19, 2021
Co-authored-by: Thomas Honeyman <[email protected]>
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 a pull request may close this issue.

1 participant