File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ module Node.Process
1919 , stdout
2020 , stderr
2121 , stdoutIsTTY
22+ , stderrIsTTY
2223 , version
2324 ) where
2425
@@ -132,10 +133,18 @@ stdout = process.stdout
132133stderr :: forall eff . Writable () (console :: CONSOLE , err :: EXCEPTION | eff )
133134stderr = process.stderr
134135
135- -- | Check whether the process is being run inside a TTY context
136+ -- | Check whether the standard output stream appears to be attached to a TTY.
137+ -- | It is a good idea to check this before printing ANSI codes to stdout
138+ -- | (e.g. for coloured text in the terminal).
136139stdoutIsTTY :: Boolean
137140stdoutIsTTY = process.stdout.isTTY
138141
142+ -- | Check whether the standard error stream appears to be attached to a TTY.
143+ -- | It is a good idea to check this before printing ANSI codes to stderr
144+ -- | (e.g. for coloured text in the terminal).
145+ stderrIsTTY :: Boolean
146+ stderrIsTTY = process.stderr.isTTY
147+
139148-- | Get the Node.js version.
140149version :: String
141150version = process.version
You can’t perform that action at this time.
0 commit comments