Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Added check for log.gauge.isEnabled #60

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions log.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@ log.gauge = new Gauge(stream, {

log.tracker = new Progress.TrackerGroup()

// we track this separately as we may need to temporarily disable the
// display of the status bar for our own loggy purposes.
log.progressEnabled = log.gauge.isEnabled()
if (log.gauge.isEnabled) {
// we track this separately as we may need to temporarily disable the
// display of the status bar for our own loggy purposes.
log.progressEnabled = log.gauge.isEnabled()
} else {
// older versions of gauge do not have isEnabled, and some dependency graphs resolve to it
// see https://github.com/npm/npmlog/issues/48
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be some kind of warning here?

If not, I can just remove the else and move the comment above the if. Please advise 😊

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous behavior was to explicitly set log.progressEnabled to false, so I would do that here.

}

var unicodeEnabled

Expand Down