Skip to content

Commit

Permalink
Merge pull request #2620 from den-rgb/OCM-12482
Browse files Browse the repository at this point in the history
OCM-12482 | fix: Fixed tempalte dir env var to work
  • Loading branch information
openshift-merge-bot[bot] authored Nov 13, 2024
2 parents cc26c68 + 6c77e0b commit d8a7f95
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/options/network/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ func BuildNetworkCommandWithOptions() (*cobra.Command, *NetworkUserOptions) {
Args: cobra.MaximumNArgs(1),
Hidden: false,
}
var exportedTempDir string
if options.TemplateDir != "" {
exportedTempDir = options.TemplateDir
}

flags := cmd.Flags()
flags.StringVar(
Expand All @@ -93,6 +97,9 @@ func BuildNetworkCommandWithOptions() (*cobra.Command, *NetworkUserOptions) {
DefaultTemplateDir,
"Use a specific template directory, overriding the OCM_TEMPLATE_DIR environment variable.",
)
if exportedTempDir != "" {
options.TemplateDir = exportedTempDir
}
flags.StringArrayVar(
&options.Params,
"param",
Expand Down

0 comments on commit d8a7f95

Please sign in to comment.