From d7efd33a5b14f799295ace132e9d165969abd07a Mon Sep 17 00:00:00 2001 From: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com> Date: Mon, 11 Nov 2019 09:42:47 +0100 Subject: [PATCH] Fix bug in step generator (#964) When using step generator outside of the current package the `PrepareConfig` call was not done using the prefix. --- pkg/generator/helper/helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/generator/helper/helper.go b/pkg/generator/helper/helper.go index 438b10407..39bbcec9c 100644 --- a/pkg/generator/helper/helper.go +++ b/pkg/generator/helper/helper.go @@ -56,7 +56,7 @@ func {{.CobraCmdFuncName}}() *cobra.Command { PreRunE: func(cmd *cobra.Command, args []string) error { log.SetStepName("{{ .StepName }}") log.SetVerbose({{if .ExportPrefix}}{{ .ExportPrefix }}.{{end}}GeneralConfig.Verbose) - return PrepareConfig(cmd, &metadata, "{{ .StepName }}", &my{{ .StepName | title}}Options, {{if .ExportPrefix}}{{ .ExportPrefix }}.{{end}}OpenPiperFile) + return {{if .ExportPrefix}}{{ .ExportPrefix }}.{{end}}PrepareConfig(cmd, &metadata, "{{ .StepName }}", &my{{ .StepName | title}}Options, {{if .ExportPrefix}}{{ .ExportPrefix }}.{{end}}OpenPiperFile) }, RunE: func(cmd *cobra.Command, args []string) error { return {{.StepName}}(my{{ .StepName | title }}Options)