Assert type against actual return val's interface.
Exit code example produces now correctly, https://github.com/codegangsta/cli#exit-code ``` $ ./ec --ginger-crouton=false it is not in the soup $ echo $? 86 $ ```
This commit is contained in:
parent
ff84ca213d
commit
f90241a6a3
2
app.go
2
app.go
@ -438,7 +438,7 @@ func HandleAction(action interface{}, context *Context) (err error) {
|
|||||||
return errInvalidActionSignature
|
return errInvalidActionSignature
|
||||||
}
|
}
|
||||||
|
|
||||||
if retErr, ok := reflect.ValueOf(vals[0]).Interface().(error); ok {
|
if retErr, ok := vals[0].Interface().(error); ok {
|
||||||
return retErr
|
return retErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user