Skip to content

Commit

Permalink
Avoid mixing color/unix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
winwinashwin authored Jan 7, 2023
1 parent ea51cfa commit 9bfa316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ License (MIT):

namespace dbg {

#if defined(DBG_MACRO_UNIX) && !defined(DBG_MACRO_FORCE_COLOR)
#ifdef DBG_MACRO_UNIX
inline bool isColorizedOutputEnabled() {
return isatty(fileno(stderr));
return defined(DBG_MACRO_FORCE_COLOR) || isatty(fileno(stderr));
}
#else
inline bool isColorizedOutputEnabled() {
Expand Down

0 comments on commit 9bfa316

Please sign in to comment.