Skip to content

Commit acbe85b

Browse files
authoredMay 31, 2017
view: wait until write completes to call cb (#16791)
Fixes: npm/npm#16780 PR-URL: npm/npm#16791 Credit: @zkat Reviewed-By: @iarna
1 parent dc2823a commit acbe85b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎lib/view.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,7 @@ function printData (data, name, cb) {
300300
log.disableProgress()
301301

302302
// print directly to stdout to not unnecessarily add blank lines
303-
process.stdout.write(msg)
304-
305-
cb(null, data)
303+
process.stdout.write(msg, () => cb(null, data))
306304
}
307305
function cleanup (data) {
308306
if (Array.isArray(data)) {

0 commit comments

Comments
 (0)