Skip to content

Commit

Permalink
Merge pull request #752 from Bhavesh-Parmar/patch-1
Browse files Browse the repository at this point in the history
error managed in run_stdin example
  • Loading branch information
apocas authored Feb 16, 2024
2 parents 3dbed5b + 90c5285 commit 0a1e34c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/run_stdin.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ var previousKey,
CTRL_Q = '\u0011';

function handler(err, container) {
//Check error and thow it
if(err) throw new Error(err);

var attach_opts = {stream: true, stdin: true, stdout: true, stderr: true};

container.attach(attach_opts, function handler(err, stream) {
Expand Down

0 comments on commit 0a1e34c

Please sign in to comment.