0
0
mirror of https://github.com/thegeeklab/wp-ansible.git synced 2024-06-02 18:29:40 +02:00

fix overwrite of ExecuteFunc

This commit is contained in:
Robert Kaussow 2024-05-04 16:06:38 +02:00
parent 156982c2f0
commit 95436173b2
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -69,6 +69,7 @@ func New(e wp.ExecuteFunc, build ...string) *Plugin {
Name: "wp-ansible",
Description: "Manage infrastructure with Ansible",
Flags: Flags(p.Settings, wp.FlagsPluginCategory),
Execute: p.run,
HideWoodpeckerFlags: true,
}
@ -80,8 +81,8 @@ func New(e wp.ExecuteFunc, build ...string) *Plugin {
options.VersionMetadata = fmt.Sprintf("date=%s", build[1])
}
if e == nil {
options.Execute = p.run
if e != nil {
options.Execute = e
}
p.Plugin = wp.New(options)