1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-03 09:03:02 +00:00

added os/isatty, do not enable colors if stdout is not a tty

This commit is contained in:
Ico Doornekamp
2023-06-02 10:52:13 +02:00
parent e97299fc65
commit e0ea844d50
2 changed files with 21 additions and 1 deletions

View File

@@ -3903,7 +3903,9 @@
(if-let [jp (getenv-alias "JANET_PATH")] (setdyn *syspath* jp))
(if-let [jprofile (getenv-alias "JANET_PROFILE")] (setdyn *profilepath* jprofile))
(set colorize (not (getenv-alias "NO_COLOR")))
(set colorize (and
(not (getenv-alias "NO_COLOR"))
(os/isatty stdout)))
(defn- get-lint-level
[i]