From 14ea818f8d1d672dc9052135fe7d6f776470f8a2 Mon Sep 17 00:00:00 2001 From: Overbool Date: Wed, 12 Sep 2018 09:01:08 +0800 Subject: [PATCH] fix(option): print error message for error timeout option License: MIT Signed-off-by: Overbool --- cli/run.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/run.go b/cli/run.go index 3b532c6c..7f615f62 100644 --- a/cli/run.go +++ b/cli/run.go @@ -39,6 +39,7 @@ func Run(ctx context.Context, root *cmds.Command, if timeoutStr, ok := req.Options[cmds.TimeoutOpt]; ok { timeout, err := time.ParseDuration(timeoutStr.(string)) if err != nil { + printErr(err) return err } req.Context, cancel = context.WithTimeout(req.Context, timeout)