Skip to content

Commit

Permalink
Merge pull request #1196 from pivotal/fix-rebase
Browse files Browse the repository at this point in the history
Fix rebase command args
  • Loading branch information
tomkennedy513 authored Apr 25, 2023
2 parents 764d6ee + 7392162 commit 9081a18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/rebase/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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) {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 9081a18

Please # to comment.