Skip to content

Commit e3140f5

Browse files
committed
fix: 🐛 Slice complete correctly for progress bar (by @ptbrowne)
From unmerged PR visionmedia/node-progress#180
1 parent 29826af commit e3140f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/cozy-scripts/utils/progress.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ ProgressBar.prototype.render = function(tokens, force) {
172172
)
173173

174174
/* add head to the complete string */
175-
if (completeLength > 0) complete = complete.slice(0, -1) + this.chars.head
175+
if (completeLength > 0)
176+
complete = complete.slice(0, -this.chars.complete.length) + this.chars.head
176177

177178
/* fill in the actual progress bar */
178179
str = str.replace(':bar', complete + incomplete)

0 commit comments

Comments
 (0)