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:
Paul Makepeace 2016-05-01 20:58:59 -07:00
parent ff84ca213d
commit f90241a6a3

2
app.go
View File

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