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
	$
	```
main
Paul Makepeace 9 years ago
parent ff84ca213d
commit f90241a6a3

@ -438,7 +438,7 @@ func HandleAction(action interface{}, context *Context) (err error) {
return errInvalidActionSignature
}
if retErr, ok := reflect.ValueOf(vals[0]).Interface().(error); ok {
if retErr, ok := vals[0].Interface().(error); ok {
return retErr
}

Loading…
Cancel
Save