(cmd *cobra.Command, args []string)
| 123 | } |
| 124 | |
| 125 | func connReinstallRun(cmd *cobra.Command, args []string) error { |
| 126 | if len(args) != 1 { |
| 127 | if RpcContext.Conn == "" { |
| 128 | return fmt.Errorf("no connection specified") |
| 129 | } |
| 130 | args = []string{RpcContext.Conn} |
| 131 | } |
| 132 | connName := args[0] |
| 133 | if err := validateConnectionName(connName); err != nil { |
| 134 | return err |
| 135 | } |
| 136 | data := wshrpc.ConnExtData{ |
| 137 | ConnName: connName, |
| 138 | LogBlockId: RpcContext.BlockId, |
| 139 | } |
| 140 | err := wshclient.ConnReinstallWshCommand(RpcClient, data, &wshrpc.RpcOpts{Timeout: 60000}) |
| 141 | if err != nil { |
| 142 | return fmt.Errorf("reinstalling connection: %w", err) |
| 143 | } |
| 144 | WriteStdout("wsh reinstalled on connection %q\n", connName) |
| 145 | return nil |
| 146 | } |
| 147 | |
| 148 | func connDisconnectRun(cmd *cobra.Command, args []string) error { |
| 149 | connName := args[0] |
nothing calls this directly
no test coverage detected