Skip to content

Commit

Permalink
fix(Pull/PushStream): Clear line only when written before
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasHechenberger committed Mar 18, 2017
1 parent 5a34ef0 commit 8137eea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/lib/gulp/PullStream.js
Expand Up @@ -40,8 +40,10 @@ export default class PullStream {
.pipe(dest('./src'))
.on('data', () => {}) // Unpipe readable stream
.on('end', () => {
readline.clearLine(process.stdout, 0);
readline.cursorTo(process.stdout, 0);
if (Logger.listenerCount('info') > 0) {
readline.clearLine(process.stdout, 0);
readline.cursorTo(process.stdout, 0);
}

clearInterval(printProgress);
});
Expand Down
6 changes: 4 additions & 2 deletions src/lib/gulp/PushStream.js
Expand Up @@ -38,8 +38,10 @@ export default class PushStream {
)
.pipe(writeStream)
.on('end', () => {
readline.cursorTo(process.stdout, 0);
readline.clearLine(process.stdout);
if (Logger.listenerCount('info') > 0) {
readline.cursorTo(process.stdout, 0);
readline.clearLine(process.stdout);
}

clearInterval(printProgress);
});
Expand Down

0 comments on commit 8137eea

Please sign in to comment.