summaryrefslogtreecommitdiff
path: root/pkg/hooks/exec/exec.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-09 02:32:52 -0800
committerGitHub <noreply@github.com>2019-01-09 02:32:52 -0800
commit0a7373e802bbc56fa4574fca51005c576a7e04da (patch)
tree490ce40fdae6b792135c3de93ee586314eedfae0 /pkg/hooks/exec/exec.go
parentc9d63fe89d0a79b069b56249aaa4c168b47649c0 (diff)
parent99e642d9409aef2fadb21546444d3a6a92604124 (diff)
downloadpodman-0a7373e802bbc56fa4574fca51005c576a7e04da.tar.gz
podman-0a7373e802bbc56fa4574fca51005c576a7e04da.tar.bz2
podman-0a7373e802bbc56fa4574fca51005c576a7e04da.zip
Merge pull request #1830 from wking/config-filter-hooks
hooks: Add pre-create hooks for runtime-config manipulation
Diffstat (limited to 'pkg/hooks/exec/exec.go')
-rw-r--r--pkg/hooks/exec/exec.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/hooks/exec/exec.go b/pkg/hooks/exec/exec.go
index 94469b1d2..0dd091561 100644
--- a/pkg/hooks/exec/exec.go
+++ b/pkg/hooks/exec/exec.go
@@ -10,6 +10,7 @@ import (
"time"
rspec "github.com/opencontainers/runtime-spec/specs-go"
+ "github.com/pkg/errors"
)
// DefaultPostKillTimeout is the recommended default post-kill timeout.
@@ -42,7 +43,11 @@ func Run(ctx context.Context, hook *rspec.Hook, state []byte, stdout io.Writer,
}
exit := make(chan error, 1)
go func() {
- exit <- cmd.Wait()
+ err := cmd.Wait()
+ if err != nil {
+ err = errors.Wrapf(err, "executing %v", cmd.Args)
+ }
+ exit <- err
}()
select {