diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-30 10:50:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-30 10:50:56 +0000 |
commit | 19f080f1af884c1e36f55dc81cd51b0ac91a868a (patch) | |
tree | f3e5eb1d468948ac9e6b86fde0803250e2b8d6ba | |
parent | e9edddaaf2ab9d769d36adf00f97034db0a3cadf (diff) | |
parent | b07eb0bc91b6de7c0f3e52cea5611a8b9115d6ca (diff) | |
download | podman-19f080f1af884c1e36f55dc81cd51b0ac91a868a.tar.gz podman-19f080f1af884c1e36f55dc81cd51b0ac91a868a.tar.bz2 podman-19f080f1af884c1e36f55dc81cd51b0ac91a868a.zip |
Merge pull request #7827 from vrothberg/systemd-run-error
healthchecks: return systemd-run error
-rw-r--r-- | libpod/healthcheck_linux.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libpod/healthcheck_linux.go b/libpod/healthcheck_linux.go index 08f37d412..b0f1ff35d 100644 --- a/libpod/healthcheck_linux.go +++ b/libpod/healthcheck_linux.go @@ -35,9 +35,8 @@ func (c *Container) createTimer() error { conn.Close() logrus.Debugf("creating systemd-transient files: %s %s", "systemd-run", cmd) systemdRun := exec.Command("systemd-run", cmd...) - _, err = systemdRun.CombinedOutput() - if err != nil { - return err + if output, err := systemdRun.CombinedOutput(); err != nil { + return errors.Errorf("%s", output) } return nil } |