Skip to content

Commit

Permalink
chore: remove errors depricated pkg
Browse files Browse the repository at this point in the history
Signed-off-by: MohammadHasan Akbari <[email protected]>
Signed-off-by: MohammadHasan Akbari <[email protected]>
  • Loading branch information
jarqvi committed Oct 2, 2024
1 parent 3189f4d commit 29daf84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions pkg/compose/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
Expand Down

0 comments on commit 29daf84

Please sign in to comment.