Skip to content

Commit

Permalink
Merge pull request #610 from DannyBen/fix/no-color-spec
Browse files Browse the repository at this point in the history
fix(colors): only print colors if NO_COLOR is non-empty string
  • Loading branch information
DannyBen authored Jan 19, 2025
2 parents 4fa73db + ec65bee commit 29c5e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bashly/libraries/colors/colors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
print_in_color() {
local color="$1"
shift
if [[ -z ${NO_COLOR+x} ]]; then
if [[ "${NO_COLOR:-}" == "" ]]; then
printf "$color%b\e[0m\n" "$*"
else
printf "%b\n" "$*"
Expand Down

0 comments on commit 29c5e60

Please sign in to comment.