Skip to content

Commit

Permalink
OCM-12482 | fix: Fixed tempalte dir env var to work
Browse files Browse the repository at this point in the history
  • Loading branch information
den-rgb authored and openshift-cherrypick-robot committed Nov 13, 2024
1 parent cc1ef6a commit 65ab7df
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 65ab7df

Please sign in to comment.