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 <116190942+jarqvi@users.noreply.github.com>
Signed-off-by: MohammadHasan Akbari <jarqvi.jarqvi@gmail.com>
  • 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.