Skip to content

Commit f387380

Browse files
makenowjustysbaddaden
authored andcommittedJul 31, 2017
Correctly work __has_color check in bin/crystal
1 parent 9abbd40 commit f387380

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

Diff for: ‎bin/crystal

+2-3
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,16 @@ __has_colors() {
115115
return 1
116116
fi
117117
}
118-
SUPPORTS_COLORS=$(__has_colors)
119118
__error_msg() {
120-
if $SUPPORTS_COLORS; then
119+
if __has_colors; then
121120
# bold red coloring
122121
printf '%b\n' "\033[31;1m$@\033[0m" 1>&2
123122
else
124123
printf '%b\n' "$@" 1>&2
125124
fi
126125
}
127126
__warning_msg() {
128-
if $SUPPORTS_COLORS; then
127+
if __has_colors; then
129128
# brown coloring
130129
printf '%b\n' "\033[33m$@\033[0m" 1>&2
131130
else

0 commit comments

Comments
 (0)
Please sign in to comment.