Merge branch 'master' into update-wording-around-gopkgin

This commit is contained in:
Dan Buch 2016-09-11 11:43:05 -04:00 committed by GitHub
commit b425397570
2 changed files with 8 additions and 3 deletions

View File

@ -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.:
<!-- { <!-- {

View File

@ -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
} }