diff --git a/go.mod b/go.mod index f4c23c23a..da8a67a32 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,6 @@ require ( github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0 github.com/otiai10/copy v1.14.0 - github.com/pkg/errors v0.9.1 github.com/r3labs/sse v0.0.0-20210224172625-26fe804710bc github.com/sirupsen/logrus v1.9.3 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 @@ -144,6 +143,7 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.17.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect diff --git a/pkg/compose/export.go b/pkg/compose/export.go index 18ce4237e..795208ae1 100644 --- a/pkg/compose/export.go +++ b/pkg/compose/export.go @@ -25,7 +25,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/docker/compose/v2/pkg/api" "github.com/docker/compose/v2/pkg/progress" - "github.com/pkg/errors" ) func (s *composeService) Export(ctx context.Context, projectName string, options api.ExportOptions) error { @@ -43,11 +42,11 @@ func (s *composeService) export(ctx context.Context, projectName string, options } if options.Output == "" && s.dockerCli.Out().IsTerminal() { - return errors.New("output option is required when exporting to terminal") + return fmt.Errorf("output option is required when exporting to terminal") } if err := command.ValidateOutputPath(options.Output); err != nil { - return errors.Wrap(err, "failed to export container") + return fmt.Errorf("failed to export container: %w", err) } clnt := s.dockerCli.Client()