Merge branch 'master' into update-wording-around-gopkgin
This commit is contained in:
commit
b425397570
@ -849,7 +849,7 @@ func main() {
|
|||||||
|
|
||||||
### Generated Help Text
|
### Generated Help Text
|
||||||
|
|
||||||
The default help flag (`-h/--help`) is defined as `cli.HelpFlag` and is checked
|
The default help flag (`-h/--help`) is defined as `cli.HelpFlag` and is checked
|
||||||
by the cli internals in order to print generated help text for the app, command,
|
by the cli internals in order to print generated help text for the app, command,
|
||||||
or subcommand, and break execution.
|
or subcommand, and break execution.
|
||||||
|
|
||||||
@ -954,7 +954,7 @@ is checked by the cli internals in order to print the `App.Version` via
|
|||||||
|
|
||||||
#### Customization
|
#### Customization
|
||||||
|
|
||||||
The default flag may be cusomized to something other than `-v/--version` by
|
The default flag may be customized to something other than `-v/--version` by
|
||||||
setting `cli.VersionFlag`, e.g.:
|
setting `cli.VersionFlag`, e.g.:
|
||||||
|
|
||||||
<!-- {
|
<!-- {
|
||||||
|
@ -79,7 +79,12 @@ func (c *Context) IsSet(name string) bool {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
envVarValue := reflect.ValueOf(f).FieldByName("EnvVar")
|
val := reflect.ValueOf(f)
|
||||||
|
if val.Kind() == reflect.Ptr {
|
||||||
|
val = val.Elem()
|
||||||
|
}
|
||||||
|
|
||||||
|
envVarValue := val.FieldByName("EnvVar")
|
||||||
if !envVarValue.IsValid() {
|
if !envVarValue.IsValid() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user