MCPcopy Index your code
hub / github.com/larksuite/cli / executeRootIntegration

Function executeRootIntegration

cmd/root_integration_test.go:56–63  ·  view source on GitHub ↗

executeRootIntegration runs a command through the full command tree and handleRootError, returning the exit code matching real CLI behavior.

(t *testing.T, f *cmdutil.Factory, rootCmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

54// executeRootIntegration runs a command through the full command tree and
55// handleRootError, returning the exit code matching real CLI behavior.
56func executeRootIntegration(t *testing.T, f *cmdutil.Factory, rootCmd *cobra.Command, args []string) int {
57 t.Helper()
58 rootCmd.SetArgs(args)
59 if err := rootCmd.Execute(); err != nil {
60 return handleRootError(f, err)
61 }
62 return 0
63}
64
65// typedErrorEnvelope mirrors the typed wire shape produced by
66// WriteTypedErrorEnvelope: the inner error marshals an errs.Problem

Calls 1

handleRootErrorFunction · 0.85

Tested by

no test coverage detected