Bump urfave/cli to v3.2.0 (#49)

Reviewed-on: https://codeberg.org/woodpecker-plugins/go-plugin/pulls/49
Reviewed-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-committed-by: Robert Kaussow <mail@thegeeklab.de>
This commit is contained in:
Robert Kaussow
2025-04-24 06:44:11 +00:00
committed by Patrick Schratz
parent 044f72ed49
commit e3f4284781
7 changed files with 24 additions and 24 deletions
+4 -4
View File
@@ -42,7 +42,7 @@ type Options struct {
// Plugin defines the plugin instance.
type Plugin struct {
app *cli.Command
App *cli.Command
execute ExecuteFunc
client *http.Client
ctx context.Context
@@ -68,11 +68,11 @@ func New(opt Options) *Plugin {
}
plugin := &Plugin{
app: app,
App: app,
execute: opt.Execute,
ctx: opt.Context,
}
plugin.app.Action = plugin.action
plugin.App.Action = plugin.action
if plugin.ctx == nil {
plugin.ctx = context.Background()
@@ -103,7 +103,7 @@ func (p *Plugin) HTTPClient() *http.Client {
// Run the plugin.
func (p *Plugin) Run() {
if err := p.app.Run(p.ctx, os.Args); err != nil {
if err := p.App.Run(p.ctx, os.Args); err != nil {
log.Error().Err(err).Msg("execution failed")
os.Exit(1)
}