Bug fix - Wrong plugin gets executed
@@ -108,7 +108,14 @@ func signaturesToCommands(signatures []*components.PluginSignature) []cli.Comman
Name: sig.Name,
Usage: sig.Usage,
SkipFlagParsing: true,
- Action: func(c *cli.Context) error {
+ Action: getAction(*sig),
+ })
+ }
+ return commands
+}
+
+func getAction(sig components.PluginSignature) func(*cli.Context) error {
+ return func(c *cli.Context) error {
output, err := gofrogcmd.RunCmdOutput(
&SignatureCmd{
sig.ExecutablePath,
@@ -117,10 +124,7 @@ func signaturesToCommands(signatures []*components.PluginSignature) []cli.Comman
log.Output(output)
}
return err
- },
- })
}
- return commands
}
func GetPlugins() []cli.Command {
