Fix global flags in Subcommands

closes #69
This commit is contained in:
Philippe Lafoucrière
2014-07-06 11:04:48 +02:00
parent bb9189510a
commit df5fb46048
2 changed files with 32 additions and 2 deletions

2
app.go
View File

@@ -151,7 +151,7 @@ func (a *App) RunAsSubcommand(ctx *Context) error {
set.SetOutput(ioutil.Discard)
err := set.Parse(ctx.Args().Tail())
nerr := normalizeFlags(a.Flags, set)
context := NewContext(a, set, set)
context := NewContext(a, set, ctx.globalSet)
if nerr != nil {
fmt.Println(nerr)