Skip to content

Commit

Permalink
Adjust messages for new flag format
Browse files Browse the repository at this point in the history
At one point, flags for this were just using the single hyphen form, but
now they use double hyphens. Those leading hyphens have simply been
removed from messages mentioning them.

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
  • Loading branch information
JustinKuli authored and openshift-merge-bot[bot] committed Sep 16, 2024
1 parent d7cd0f1 commit ae6c4b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/template-resolver/utils/resolver_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (t *TemplateResolver) resolveTemplates(cmd *cobra.Command, args []string) e
if t.hubKubeConfigPath != "" && t.clusterName == "" {
return fmt.Errorf(
"when a hub kubeconfig is provided, you must provide a managed cluster name for hub templates to resolve " +
"using the -cluster-name argument",
"using the cluster-name argument",
)
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/template-resolver/utils/resolver_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func processObjTemplatesRaw(
}

if bytes.Contains([]byte(oTRaw), []byte("{{hub")) {
return fmt.Errorf("unresolved hub template in YAML input. Use the -hub-kubeconfig argument")
return fmt.Errorf("unresolved hub template in YAML input. Use the hub-kubeconfig argument")
}

tmplResult, err := resolver.ResolveTemplate([]byte(oTRaw), nil, &resolveOptions)
Expand Down Expand Up @@ -490,7 +490,7 @@ func resolveManagedTemplate(
}

if bytes.Contains(rawData, []byte("{{hub")) {
return nil, fmt.Errorf("unresolved hub template in YAML input. Use the -hub-kubeconfig argument")
return nil, fmt.Errorf("unresolved hub template in YAML input. Use the hub-kubeconfig argument")
}

tmplResult, err := resolver.ResolveTemplate(rawData, nil, &resolveOptions)
Expand Down

0 comments on commit ae6c4b6

Please sign in to comment.