0
0
mirror of https://github.com/thegeeklab/wp-opentofu.git synced 2024-11-21 14:20:40 +00:00

fix: fix overwrite of ExecuteFunc (#38)

This commit is contained in:
Robert Kaussow 2024-05-04 16:19:48 +02:00 committed by GitHub
parent 4776687d47
commit 2122890118
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.22
require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/rs/zerolog v1.32.0
github.com/thegeeklab/wp-plugin-go/v2 v2.0.0
github.com/thegeeklab/wp-plugin-go/v2 v2.0.1
github.com/urfave/cli/v2 v2.27.2
golang.org/x/sys v0.19.0
)

4
go.sum
View File

@ -47,8 +47,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/thegeeklab/wp-plugin-go/v2 v2.0.0 h1:7dChME92qqpdtvDM4O2FZOoRv3jfkjlHCw/ijbE9SxQ=
github.com/thegeeklab/wp-plugin-go/v2 v2.0.0/go.mod h1:KRfDolkPSpO7Zx54Y0ofTFA7Cvd+7bHTHzYnYAo9WYg=
github.com/thegeeklab/wp-plugin-go/v2 v2.0.1 h1:42kqe5U1x5Ysa9I8tDEhh+tyvfFkfXKvlb3UsigBmN4=
github.com/thegeeklab/wp-plugin-go/v2 v2.0.1/go.mod h1:KRfDolkPSpO7Zx54Y0ofTFA7Cvd+7bHTHzYnYAo9WYg=
github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI=
github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM=
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw=

View File

@ -62,6 +62,7 @@ func New(e wp.ExecuteFunc, build ...string) *Plugin {
Name: "wp-opentofu",
Description: "Manage infrastructure with OpenTofu",
Flags: Flags(p.Settings, wp.FlagsPluginCategory),
Execute: p.run,
HideWoodpeckerFlags: true,
}
@ -73,8 +74,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)