aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-30 10:50:56 +0000
committerGitHub <noreply@github.com>2020-09-30 10:50:56 +0000
commit19f080f1af884c1e36f55dc81cd51b0ac91a868a (patch)
treef3e5eb1d468948ac9e6b86fde0803250e2b8d6ba /libpod
parente9edddaaf2ab9d769d36adf00f97034db0a3cadf (diff)
parentb07eb0bc91b6de7c0f3e52cea5611a8b9115d6ca (diff)
downloadpodman-19f080f1af884c1e36f55dc81cd51b0ac91a868a.tar.gz
podman-19f080f1af884c1e36f55dc81cd51b0ac91a868a.tar.bz2
podman-19f080f1af884c1e36f55dc81cd51b0ac91a868a.zip
Merge pull request #7827 from vrothberg/systemd-run-error
healthchecks: return systemd-run error
Diffstat (limited to 'libpod')
-rw-r--r--libpod/healthcheck_linux.go5
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
}