Skip to content

Commit

Permalink
chore: Update logger to disable progress bar when stdout is not a tty…
Browse files Browse the repository at this point in the history
… and progress bar is not null
  • Loading branch information
janjurca committed Jun 25, 2024
1 parent e1688ef commit 3adeb5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/filestorm/utils/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class FilestormLogger {

void set_progress_bar(ProgressBar *progress_bar) {
m_progress_bar = progress_bar;
if (!isatty(fileno(stdout))) {
if (!isatty(fileno(stdout)) && m_progress_bar != nullptr) {
m_progress_bar->disable();
warn("Progress bar disabled because stdout is not a tty");
}
Expand Down

0 comments on commit 3adeb5d

Please sign in to comment.