Skip to content

Commit

Permalink
add error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wreulicke committed May 21, 2020
1 parent d5c4324 commit 5e0238f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions key.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func AddKey(ssmCli *ssm.Client, instanceIds []string, user string, publicKeyPath
},
})
res, err := req.Send(ctx)
if err != nil {
return err
}
commandID := res.Command.CommandId
err = WaitCommandInvocations(ctx, ssmCli, commandID)
if err != nil {
Expand Down

0 comments on commit 5e0238f

Please sign in to comment.