Cli setup command (#3384)

Co-authored-by: Robert Kaussow <xoxys@rknet.org>
This commit is contained in:
Anbraten
2024-03-13 11:08:22 +01:00
committed by GitHub
parent 1026f95f7e
commit 03c891eb93
17 changed files with 665 additions and 43 deletions

View File

@@ -8,6 +8,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/urfave/cli/v2"
"go.woodpecker-ci.org/woodpecker/v2/cli/internal/config"
"go.woodpecker-ci.org/woodpecker/v2/cli/update"
)
@@ -17,7 +18,7 @@ var (
)
func Before(c *cli.Context) error {
if err := SetupGlobalLogger(c); err != nil {
if err := setupGlobalLogger(c); err != nil {
return err
}
@@ -49,7 +50,7 @@ func Before(c *cli.Context) error {
}
}()
return nil
return config.Load(c)
}
func After(_ *cli.Context) error {