From a10d5feb6be9127a39291ffcd418ab7fcd6e66d7 Mon Sep 17 00:00:00 2001 From: "xiarui.xr" Date: Thu, 14 Sep 2023 16:24:57 +0800 Subject: [PATCH] fix: show error message and exit after doc cmd validation error --- cmds/kcl-go/command/cmd_doc.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmds/kcl-go/command/cmd_doc.go b/cmds/kcl-go/command/cmd_doc.go index a6e603c7..0bad89fc 100644 --- a/cmds/kcl-go/command/cmd_doc.go +++ b/cmds/kcl-go/command/cmd_doc.go @@ -80,6 +80,7 @@ kcl-go doc generate --file-path --target `, genContext, err := opts.ValidateComplete() if err != nil { fmt.Println(fmt.Errorf("generate failed: %s", err)) + return err } err = genContext.GenDoc()