diff --git a/envbuilder.go b/envbuilder.go index d8cd8396..3c5bfcef 100644 --- a/envbuilder.go +++ b/envbuilder.go @@ -49,7 +49,6 @@ import ( "github.com/mattn/go-isatty" "github.com/sirupsen/logrus" "github.com/tailscale/hujson" - "golang.org/x/xerrors" ) // ErrNoFallbackImage is returned when no fallback image has been specified. @@ -268,7 +267,7 @@ func run(ctx context.Context, opts options.Options, execArgs *execArgsInfo) erro defer file.Close() if opts.FallbackImage == "" { if fallbackErr != nil { - return nil, xerrors.Errorf("%s: %w", fallbackErr.Error(), ErrNoFallbackImage) + return nil, fmt.Errorf("%s: %w", fallbackErr.Error(), ErrNoFallbackImage) } // We can't use errors.Join here because our tests // don't support parsing a multiline error. @@ -582,7 +581,7 @@ func run(ctx context.Context, opts options.Options, execArgs *execArgsInfo) erro endStage := startStage("🏗️ Building image...") image, err := executor.DoBuild(kOpts) if err != nil { - return nil, xerrors.Errorf("do build: %w", err) + return nil, fmt.Errorf("do build: %w", err) } endStage("🏗️ Built image!") if opts.PushImage { @@ -602,7 +601,7 @@ func run(ctx context.Context, opts options.Options, execArgs *execArgsInfo) erro } else if !opts.ExitOnPushFailure { endStage("⚠️️ Failed to push image!") } else { - return nil, xerrors.Errorf("do push: %w", err) + return nil, fmt.Errorf("do push: %w", err) } } @@ -1253,7 +1252,7 @@ func RunCacheProbe(ctx context.Context, opts options.Options) (v1.Image, error) // will need to specify the path to the desired envbuilder binary. opts.Logger(log.LevelDebug, "copying envbuilder binary at %q to build context %q", opts.BinaryPath, envbuilderBinDest) if err := copyFile(opts.Filesystem, opts.BinaryPath, envbuilderBinDest, 0o755); err != nil { - return nil, xerrors.Errorf("copy envbuilder binary to build context: %w", err) + return nil, fmt.Errorf("copy envbuilder binary to build context: %w", err) } // Also write the magic file that signifies the image has been built. diff --git a/go.mod b/go.mod index 9322d425..55b361d0 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,6 @@ require ( golang.org/x/crypto v0.56.0 golang.org/x/mod v0.40.0 golang.org/x/sync v0.22.0 - golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da ) require ( @@ -384,6 +383,7 @@ require ( golang.org/x/text v0.41.0 // indirect golang.org/x/time v0.15.0 // indirect golang.org/x/tools v0.49.0 // indirect + golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect golang.zx2c4.com/wireguard/windows v0.5.3 // indirect google.golang.org/appengine v1.6.8 // indirect