Ensure MultiError returned when both Before and After funcs given
This commit is contained in:
@@ -154,9 +154,10 @@ func TestContext_GlobalFlag(t *testing.T) {
|
||||
app.Flags = []Flag{
|
||||
StringFlag{Name: "global, g", Usage: "global"},
|
||||
}
|
||||
app.Action = func(c *Context) {
|
||||
app.Action = func(c *Context) error {
|
||||
globalFlag = c.GlobalString("global")
|
||||
globalFlagSet = c.GlobalIsSet("global")
|
||||
return nil
|
||||
}
|
||||
app.Run([]string{"command", "-g", "foo"})
|
||||
expect(t, globalFlag, "foo")
|
||||
|
Reference in New Issue
Block a user