fix: get config

This commit is contained in:
lilong.129
2025-03-04 19:39:38 +08:00
parent d50b1f9855
commit e35aa782c2
10 changed files with 56 additions and 40 deletions

View File

@@ -107,7 +107,7 @@ func (pt *pluginTemplate) generate(tmpl, output string) error {
func (pt *pluginTemplate) generatePy(output string) error {
// specify output file path
if output == "" {
output = filepath.Join(config.RootDir, PluginPySourceGenFile)
output = filepath.Join(config.GetConfig().RootDir, PluginPySourceGenFile)
} else if builtin.IsFolderPathExists(output) {
output = filepath.Join(output, PluginPySourceGenFile)
}
@@ -155,7 +155,7 @@ func (pt *pluginTemplate) generateGo(output string) error {
// specify output file path
if output == "" {
output = filepath.Join(config.RootDir, PluginHashicorpGoBuiltFile)
output = filepath.Join(config.GetConfig().RootDir, PluginHashicorpGoBuiltFile)
} else if builtin.IsFolderPathExists(output) {
output = filepath.Join(output, PluginHashicorpGoBuiltFile)
}