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

Function setConfigRun

cmd/wsh/cmd/wshcmd-setconfig.go:26–43  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

24}
25
26func setConfigRun(cmd *cobra.Command, args []string) (rtnErr error) {
27 defer func() {
28 sendActivity("setconfig", rtnErr == nil)
29 }()
30
31 metaSetsStrs := args[:]
32 meta, err := parseMetaSets(metaSetsStrs)
33 if err != nil {
34 return err
35 }
36 commandData := wshrpc.MetaSettingsType{MetaMapType: meta}
37 err = wshclient.SetConfigCommand(RpcClient, commandData, &wshrpc.RpcOpts{Timeout: 2000})
38 if err != nil {
39 return fmt.Errorf("setting config: %w", err)
40 }
41 WriteStdout("config set\n")
42 return nil
43}

Callers

nothing calls this directly

Calls 4

SetConfigCommandFunction · 0.92
sendActivityFunction · 0.85
parseMetaSetsFunction · 0.85
WriteStdoutFunction · 0.85

Tested by

no test coverage detected