From f90241a6a37a14ae9d5fe678b6effc2bae462254 Mon Sep 17 00:00:00 2001 From: Paul Makepeace Date: Sun, 1 May 2016 20:58:59 -0700 Subject: [PATCH] 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 $ ``` --- app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.go b/app.go index a5b0aa3..696c05e 100644 --- a/app.go +++ b/app.go @@ -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 }