Fix UnhandledPromiseRejectionWarnings in Node.js

These were introduced in 9bdeaa9 by `await`ing Promises later than
they're created.
This commit is contained in:
Daniel Huigens
2020-01-24 18:05:50 +01:00
parent 382c05df6f
commit e8ee70b2a8
2 changed files with 2 additions and 0 deletions

View File

@@ -313,6 +313,7 @@ function dearmor(input) {
}));
data = stream.transformPair(data, async (readable, writable) => {
const checksumVerified = stream.readToEnd(getCheckSum(stream.passiveClone(readable)));
checksumVerified.catch(() => {});
await stream.pipe(readable, writable, {
preventClose: true
});