Skip to content

Lacking the counterpart of process.stdin.isTTY #30

Closed
@matoruru

Description

@matoruru

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions