Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

Commit 426f737

Browse files
committed
fix: Properly use std.should_print_color_*
1 parent d75275b commit 426f737

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/src/util/print.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,31 @@ print.die() {
88
}
99

1010
print.error() {
11-
if std.should_output_color; then
11+
if std.should_print_color_stderr; then
1212
printf "\033[1;31m\033[1mHookah \033[1m[error]:\033[0m %s\n" "$1"
1313
else
1414
printf "Hookah [error]: %s\n" "$1"
1515
fi
1616
} >&2
1717

1818
print.warn() {
19-
if std.should_output_color; then
19+
if std.should_print_color_stderr; then
2020
printf "\033[1;33m\033[1mHookah \033[1m[warn]:\033[0m %s\n" "$1"
2121
else
2222
printf "Hookah [warn]: %s\n" "$1"
2323
fi
2424
} >&2
2525

2626
print.info() {
27-
if std.should_output_color; then
27+
if std.should_print_color_stdout; then
2828
printf "\033[0;36m\033[1mHookah \033[1m[info]:\033[0m %s\n" "$1"
2929
else
3030
printf "Hookah [info]: %s\n" "$1"
3131
fi
3232
}
3333

3434
print.exec() {
35-
if std.should_output_color; then
35+
if std.should_print_color_stdout; then
3636
printf "\033[1mHookah \033[1m[exec]:\033[0m %s\n" "$*"
3737
else
3838
printf "Hookah [exec]: %s\n" "$*"

0 commit comments

Comments
 (0)