Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix rebase command args #1196

Merged
merged 1 commit into from
Apr 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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