We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3472dd commit 92f912fCopy full SHA for 92f912f
cmd/main.go
@@ -50,11 +50,15 @@ DEFAULT CONFIGURATION:
50
51
func prepareSubcommandWithGlobalFlags(originCmd *cli.Command) {
52
originBefore := originCmd.Before
53
- originCmd.Before = func(ctx context.Context, cmd *cli.Command) (context.Context, error) {
54
- prepareWorkPathAndCustomConf(cmd)
+ originCmd.Before = func(ctxOrig context.Context, cmd *cli.Command) (ctx context.Context, err error) {
+ ctx = ctxOrig
55
if originBefore != nil {
56
- return originBefore(ctx, cmd)
+ ctx, err = originBefore(ctx, cmd)
57
+ if err != nil {
58
+ return ctx, err
59
+ }
60
}
61
+ prepareWorkPathAndCustomConf(cmd)
62
return ctx, nil
63
64
0 commit comments