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()