From 0917269a9a26fe4a76450912928899bc81118c55 Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Fri, 23 Jun 2017 11:31:16 -0700 Subject: [PATCH] shim: Use correct error when trying to expand runc error Signed-off-by: Kenfe-Mickael Laventure --- linux/shim/init.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/shim/init.go b/linux/shim/init.go index ce701cdd4..3c6d3228a 100644 --- a/linux/shim/init.go +++ b/linux/shim/init.go @@ -323,9 +323,9 @@ func (p *initProcess) runcError(rErr error, msg string) error { rMsg, err := getLastRuncError(p.runc) switch { case err != nil: - return errors.Wrapf(err, "%s: %s (%s)", msg, "unable to retrieve runc error", err.Error()) + return errors.Wrapf(rErr, "%s: %s (%s)", msg, "unable to retrieve runc error", err.Error()) case rMsg == "": - return errors.Wrap(err, msg) + return errors.Wrap(rErr, msg) default: return errors.Errorf("%s: %s", msg, rMsg) }