add environment variable support 🎉

This commit is contained in:
Lynn Cyrin
2019-08-01 22:52:21 -07:00
parent f21b22dd90
commit 38f9e1622d
4 changed files with 8 additions and 11 deletions

4
app.go
View File

@@ -228,7 +228,7 @@ func (a *App) Run(arguments []string) (err error) {
return nil
}
cerr := checkRequiredFlags(a.Flags, set)
cerr := checkRequiredFlags(a.Flags, context)
if cerr != nil {
ShowAppHelp(context)
return cerr
@@ -358,7 +358,7 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
}
}
cerr := checkRequiredFlags(a.Flags, set)
cerr := checkRequiredFlags(a.Flags, context)
if cerr != nil {
ShowSubcommandHelp(context)
return cerr