From 2c24fb2bcdb78ce45294f8361636691e3b6dae8e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 4 Feb 2025 15:39:11 +0100 Subject: [PATCH] cli/connhelper/commandcon: use stdlib errors Signed-off-by: Sebastiaan van Stijn --- cli/connhelper/commandconn/commandconn.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cli/connhelper/commandconn/commandconn.go b/cli/connhelper/commandconn/commandconn.go index 52888a9100..4b04f8b39f 100644 --- a/cli/connhelper/commandconn/commandconn.go +++ b/cli/connhelper/commandconn/commandconn.go @@ -28,7 +28,6 @@ import ( "syscall" "time" - "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -149,7 +148,7 @@ func (c *commandConn) handleEOF(err error) error { c.stderrMu.Lock() stderr := c.stderr.String() c.stderrMu.Unlock() - return errors.Errorf("command %v did not exit after %v: stderr=%q", c.cmd.Args, err, stderr) + return fmt.Errorf("command %v did not exit after %v: stderr=%q", c.cmd.Args, err, stderr) } } @@ -159,7 +158,7 @@ func (c *commandConn) handleEOF(err error) error { c.stderrMu.Lock() stderr := c.stderr.String() c.stderrMu.Unlock() - return errors.Errorf("command %v has exited with %v, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=%s", c.cmd.Args, werr, stderr) + return fmt.Errorf("command %v has exited with %v, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=%s", c.cmd.Args, werr, stderr) } func ignorableCloseError(err error) bool {