Skip to content
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

Initialize default for colorization from isWindows only if BOOT_COLOR is blank #536

Merged
merged 1 commit into from
Dec 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions boot/pod/src/boot/util.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[clojure.string :as string]
[boot.file :as file]
[boot.from.io.aviso.ansi :as ansi]
[boot.from.io.aviso.repl :as repl]
[boot.from.io.aviso.exception :as pretty]
[boot.from.me.raynes.conch :as conch])
(:import
Expand All @@ -19,14 +18,18 @@
(declare print-ex)

(defn colorize?-system-default
"Return whether we should colorize output on this system. This is
true, unless we're on Windows, where this is false. The default
console on Windows does not interprete ansi escape codes. The
default can be overriden by setting the environment variable
BOOT_COLOR=1 or BOOT_COLOR=yes to turn it on or any other value to
turn it off."
"Return whether we should colorize output on this system. The default
console on Windows does not interprete ANSI escape codes, so colorized
output is disabled on Windows by default, but enabled by default
on other platforms. The default can be overriden by setting the
environment variable or configuration option BOOT_COLOR to
either '1' or 'yes' to enable it; any other value disables
colorization."
[]
(or (#{"1" "yes"} (boot.App/config "BOOT_COLOR")) (not (boot.App/isWindows))))
(let [value (boot.App/config "BOOT_COLOR")]
(if-not (string/blank? value)
(#{"1" "yes"} (string/lower-case value))
(not (boot.App/isWindows)))))

(def ^:dynamic *verbosity*
"Atom containing the verbosity level, 1 is lowest, 3 highest. Level 2
Expand Down