Skip to content

Commit

Permalink
Make init output fields optional
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Nov 6, 2017
1 parent 02cb3c9 commit a71fcc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/bus-init/lib/ActorInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export interface IActorOutputInit extends IActorOutput {
/**
* A standard error output stream.
*/
stderr: Readable;
stderr?: Readable;
/**
* A standard output stream.
*/
stdout: Readable;
stdout?: Readable;
}
8 changes: 6 additions & 2 deletions packages/runner-cli/bin/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ const configResourceUrl = argv.shift();
Setup.run(configResourceUrl, { argv, env: process.env, stdin: process.stdin })
.then((results: IActorOutputInit[]) => {
results.forEach((result: IActorOutputInit) => {
result.stdout.pipe(process.stdout);
result.stderr.pipe(process.stderr);
if (result.stdout) {
result.stdout.pipe(process.stdout);
}
if (result.stderr) {
result.stderr.pipe(process.stderr);
}
});
})
.catch(console.error);

0 comments on commit a71fcc1

Please sign in to comment.