MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / Execute

Function Execute

cmd/wsh/cmd/wshcmd-root.go:234–251  ·  view source on GitHub ↗

Execute executes the root command.

()

Source from the content-addressed store, hash-verified

232
233// Execute executes the root command.
234func Execute() {
235 defer func() {
236 r := recover()
237 if r != nil {
238 WriteStderr("[panic] %v\n", r)
239 debug.PrintStack()
240 wshutil.DoShutdown("", 1, true)
241 } else {
242 wshutil.DoShutdown("", WshExitCode, false)
243 }
244 }()
245 rootCmd.PersistentFlags().StringVarP(&blockArg, "block", "b", "", "for commands which require a block id")
246 err := rootCmd.Execute()
247 if err != nil {
248 wshutil.DoShutdown("", 1, true)
249 return
250 }
251}

Callers 1

mainFunction · 0.92

Calls 2

DoShutdownFunction · 0.92
WriteStderrFunction · 0.85

Tested by

no test coverage detected