Skip to content

Commit

Permalink
Use [0m rather than [m for AppVeyor's benefit
Browse files Browse the repository at this point in the history
Issue tracked in appveyor/ci#1824
  • Loading branch information
dra27 committed May 10, 2018
1 parent 573bc90 commit 8c5064b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/core/opamConsole.ml
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ let style_code (c: text_style) = match c with
(* not nestable *)
let colorise style s =
if not (color ()) then s else
Printf.sprintf "\027[%sm%s\027[m" (style_code style) s
Printf.sprintf "\027[%sm%s\027[0m" (style_code style) s

let colorise' styles s =
if not (color ()) then s else
Printf.sprintf "\027[%sm%s\027[m"
Printf.sprintf "\027[%sm%s\027[0m"
(String.concat ";" (List.map style_code styles))
s

Expand Down
10 changes: 5 additions & 5 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ printf = /usr/bin/printf
define RUN
@COUNT=$$(ls -1 $(REPOKIND)-*.log 2>/dev/null | wc -l); \
LOG=$$($(printf) "$(REPOKIND)-%02d-$(1).log" $$COUNT); \
$(printf) " %02d \e[1m%-20s\e[m ..................................... " \
$(printf) " %02d \e[1m%-20s\e[0m ..................................... " \
$$COUNT $(1); \
if $(MAKE) $(1) >$$LOG 2>&1; then \
$(printf) "\e[32m[ OK ]\e[m\n"; \
$(printf) "\e[32m[ OK ]\e[0m\n"; \
else \
$(printf) "\e[31m$(1) FAILED\e[m\n\n" >>$$LOG; \
$(printf) "\e[31m[FAIL]\e[m\n"; \
{ $(printf) "\e[31m>> %s FAILED <<\e[m\n" $(1); cat $$LOG; } \
$(printf) "\e[31m$(1) FAILED\e[0m\n\n" >>$$LOG; \
$(printf) "\e[31m[FAIL]\e[0m\n"; \
{ $(printf) "\e[31m>> %s FAILED <<\e[0m\n" $(1); cat $$LOG; } \
>> failed-$(REPOKIND).log; \
fi; \
cat $$LOG >> fulltest-$(REPOKIND).log
Expand Down

0 comments on commit 8c5064b

Please sign in to comment.