From 7392162f311376ff8a12cafde12166c37afb03df Mon Sep 17 00:00:00 2001 From: Tom Kennedy Date: Tue, 25 Apr 2023 14:27:26 -0400 Subject: [PATCH] Fix rebase command args --- cmd/rebase/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/rebase/main.go b/cmd/rebase/main.go index 108b17850..f372c8b84 100644 --- a/cmd/rebase/main.go +++ b/cmd/rebase/main.go @@ -62,7 +62,7 @@ func main() { func rebase(tags []string, logger *log.Logger) error { if len(tags) < 1 { - return cmd.FailCode(cmd.CodeInvalidArgs, "must provide one or more image tags") + return cmd.FailCode(cmd.CodeForInvalidArgs, "must provide one or more image tags") } logger.Println("Loading cluster credential helpers") @@ -74,7 +74,7 @@ func rebase(tags []string, logger *log.Logger) error { logLoadingSecrets(logger, basicDockerCredentials) creds, err := dockercreds.ParseBasicAuthSecrets(buildSecretsDir, basicDockerCredentials) if err != nil { - return cmd.FailErrCode(err, cmd.CodeInvalidArgs) + return cmd.FailErrCode(err, cmd.CodeForInvalidArgs) } for _, c := range combine(dockerCfgCredentials, dockerConfigCredentials, imagePullSecrets) { @@ -119,7 +119,7 @@ func rebase(tags []string, logger *log.Logger) error { Logger: cmd.DefaultLogger, PlatformAPI: api.MustParse("0.9"), } - report, err := rebaser.Rebase(appImage, newBaseImage, tags[1:]) + report, err := rebaser.Rebase(appImage, newBaseImage, appImage.Name(), tags[1:]) if err != nil { return err }