Skip to content

Commit 233b3d2

Browse files
added piping exception handling
1 parent 986cff9 commit 233b3d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/spawnGPG.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ module.exports.streaming = function(options, args, cb) {
105105
}
106106

107107
// Pipe input file into gpg stdin; gpg stdout into output file..
108-
sourceStream.pipe(gpg.stdin);
109-
gpg.stdout.pipe(destStream);
108+
sourceStream.pipe(gpg.stdin).on('error', (e)=>{cb(e)});
109+
gpg.stdout.pipe(destStream).on('error', (e)=>{cb(e)});
110110
};
111111

112112
// Wrapper around spawn. Catches error events and passed global args.

0 commit comments

Comments
 (0)