Skip to content

Commit

Permalink
fix: address post-landing comments (#251)
Browse files Browse the repository at this point in the history
Fixes: #76
  • Loading branch information
ofrobots authored and JustinBeckwith committed Jan 29, 2019
1 parent 6576fc6 commit 7738ba5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test-kitchen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface ExecError extends Error {
}

function isExecError(err: Error | ExecError): err is ExecError {
return (err as ExecError).code !== undefined;
return err && (err as ExecError).code !== undefined;
}

// cp.exec doesn't fit the (err ^ result) pattern because a process can write
Expand All @@ -46,7 +46,7 @@ const execp = (
cp.exec(
command,
execOptions || {},
(err: Error | ExecError | null, stdout, stderr) => {
(err: cp.ExecException | null, stdout, stderr) => {
resolve({
exitCode: err && isExecError(err) ? err.code : 0,
stdout,
Expand Down

0 comments on commit 7738ba5

Please sign in to comment.