Skip to content

Commit

Permalink
execution: changed error detection in handleOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian E. Kwiatkowski committed Jul 30, 2021
1 parent 56197c1 commit 7a70c3f
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 10 deletions.
97 changes: 91 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloud-commands",
"version": "0.7.1",
"version": "0.7.2",
"bin": {
"c-create-function": "src/bin/functions/c-create-function.js",
"c-delete-distribution": "src/bin/functions/c-delete-distribution.js",
Expand Down
2 changes: 1 addition & 1 deletion src/arns.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function computeExecuteApiArn(computeAccountArn) {
return (apiId, stage, verb, path) => computeAccountArn('execute-api') (apiId + '/' + stage + '/' + verb + path)
}

// arn:aws:cognito-idp:[region]:[account ID]:userpool/[pool id]
export function computeUserPoolArn(computeAccountArn) {
// arn:aws:cognito-idp:[region]:[account ID]:userpool/[pool id]
return poolId => computeAccountArn('cognito-idp') ('userpool' + '/' + poolId)
}
5 changes: 3 additions & 2 deletions src/execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import child_process from "child_process"

const exec = promisify(child_process.exec)

function handleOutput({stdout, stderr}) {
if (stderr) {
function handleOutput(output) {
const { err, stderr, stdout } = output
if (err) {
throw stderr
}
else {
Expand Down

0 comments on commit 7a70c3f

Please sign in to comment.