Skip to content

Commit 6d92d5c

Browse files
committedFeb 24, 2020
Wait for open event on the writable stream
See #38 (comment)
1 parent df050ac commit 6d92d5c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎index.js

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const cpFileAsync = async (source, destination, options, progressEmitter) => {
2626

2727
let shouldUpdateStats = false;
2828
try {
29+
await pEvent(writeStream, 'open');
2930
const writePromise = pEvent(writeStream, 'close');
3031
readStream.pipe(writeStream);
3132
await writePromise;

0 commit comments

Comments
 (0)
Please sign in to comment.