Skip to content

Commit

Permalink
Enable color output whenever stdout is TTY
Browse files Browse the repository at this point in the history
  • Loading branch information
karan0299 committed Jan 11, 2020
1 parent 7e6ef91 commit 43d74a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ function exec_options(opts)
global have_color = (opts.color == 1) # --color=on
global is_interactive = (opts.isinteractive != 0)

#check if stdout is TTY and color is not set manually
if isa(stdout, Base.TTY) && color_set == false
global have_color = true
end

# pre-process command line argument list
arg_is_program = !isempty(ARGS)
repl = !arg_is_program
Expand Down

0 comments on commit 43d74a0

Please sign in to comment.