Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: "bundle copy --from" fails after "ci-env"
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed Oct 13, 2023
1 parent b2b7d68 commit 6c8ed39
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cmd/werf/bundle/copy/copy.go
Expand Up @@ -96,16 +96,15 @@ func runCopy(ctx context.Context) error {
return err
}

fromAddrRaw := cmdData.From
if fromAddrRaw != "" && cmdData.Repo != "" {
return fmt.Errorf("unable to use --repo=ADDRESS and --from=ADDRESS params at the same time: please specify only --from=ADDRESS param, --repo param has been deprecated")
} else if cmdData.Repo != "" {
var fromAddrRaw string
if cmdData.From == "" && cmdData.Repo == "" {
return fmt.Errorf("--from=ADDRESS param required")
} else if cmdData.From != "" {
fromAddrRaw = cmdData.From
} else {
logboek.Context(ctx).Warn().LogF("Please use --from=ADDRESS param instead of deprecated --repo=ADDRESS param\n")
fromAddrRaw = cmdData.Repo
}
if fromAddrRaw == "" {
return fmt.Errorf("--from=ADDRESS param required")
}

toAddrRaw := cmdData.To
if toAddrRaw == "" {
Expand Down

0 comments on commit 6c8ed39

Please sign in to comment.