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

Use OCAML_COLOR environment variable for deciding whether to use colors in output #1098

Merged
merged 1 commit into from Mar 15, 2017

Commits on Mar 15, 2017

  1. Respect OCAML_COLOR environment variable for deciding whether to use …

    …colors
    
    Since 4.03, OCaml supports coloring its messages to standard output and standard
    error, depending on the "-color" argument ({always,never,auto}).  This commit
    adds support for the environment variable "OCAML_COLOR" (which value can as well
    be {always,never,auto}).
    
    The command line argument "-color" takes precedence, "OCAML_COLOR" is only
    taken into consideration if no "-color" is provided.
    
    The motivation for this is that the user should have control over coloring
    OCaml's output messages.  OCamlbuild, a widely used build tool executes OCaml
    not under a tty (and OCaml does not colorize errors and warnings), which lead
    various packages use `color(always)` in their `_tags` files, which breaks with
    other (non-interactive) programs (i.e.  editor helpers).
    
    Further discussion was done at ocaml/ocamlbuild#87 and
    ocaml#1098.
    hannesm committed Mar 15, 2017
    Copy the full SHA
    76bf7c5 View commit details
    Browse the repository at this point in the history