Skip to content

Commit 7cfe0e6

Browse files
committed
fix 100% progress output
1 parent 5344837 commit 7cfe0e6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/logging/truncateArgs.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ const truncateArgs = (args, maxLength) => {
1515
const availableLength = maxLength - lengths.length + 1;
1616

1717
if (availableLength > 0 && args.length === 1) {
18-
if (availableLength > 3) {
18+
if (availableLength >= args[0].length) {
19+
return args;
20+
} else if (availableLength > 3) {
1921
return ["..." + args[0].slice(-availableLength + 3)];
2022
} else {
2123
return [args[0].slice(-availableLength)];

test/ProgressPlugin.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ describe("ProgressPlugin", function() {
4949
"omit arguments when no space"
5050
);
5151
expect(logs).toContain("93% ...hunk asset optimization");
52+
expect(logs).toContain("100%");
5253
});
5354
});
5455

0 commit comments

Comments
 (0)