Navigation Menu

Skip to content

Commit

Permalink
Correctly work __has_color check in bin/crystal
Browse files Browse the repository at this point in the history
  • Loading branch information
makenowjust authored and ysbaddaden committed Jul 31, 2017
1 parent 9abbd40 commit f387380
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/crystal
Expand Up @@ -115,17 +115,16 @@ __has_colors() {
return 1
fi
}
SUPPORTS_COLORS=$(__has_colors)
__error_msg() {
if $SUPPORTS_COLORS; then
if __has_colors; then
# bold red coloring
printf '%b\n' "\033[31;1m$@\033[0m" 1>&2
else
printf '%b\n' "$@" 1>&2
fi
}
__warning_msg() {
if $SUPPORTS_COLORS; then
if __has_colors; then
# brown coloring
printf '%b\n' "\033[33m$@\033[0m" 1>&2
else
Expand Down

0 comments on commit f387380

Please sign in to comment.