(ctx context.Context, data wshrpc.ConnExtData)
| 655 | } |
| 656 | |
| 657 | func (ws *WshServer) ConnReinstallWshCommand(ctx context.Context, data wshrpc.ConnExtData) error { |
| 658 | if conncontroller.IsLocalConnName(data.ConnName) { |
| 659 | return nil |
| 660 | } |
| 661 | ctx = genconn.ContextWithConnData(ctx, data.LogBlockId) |
| 662 | ctx = termCtxWithLogBlockId(ctx, data.LogBlockId) |
| 663 | connName := data.ConnName |
| 664 | if strings.HasPrefix(connName, "wsl://") { |
| 665 | distroName := strings.TrimPrefix(connName, "wsl://") |
| 666 | conn := wslconn.GetWslConn(distroName) |
| 667 | if conn == nil { |
| 668 | return fmt.Errorf("connection not found: %s", connName) |
| 669 | } |
| 670 | return conn.InstallWsh(ctx, "") |
| 671 | } |
| 672 | connOpts, err := remote.ParseOpts(connName) |
| 673 | if err != nil { |
| 674 | return fmt.Errorf("error parsing connection name: %w", err) |
| 675 | } |
| 676 | conn := conncontroller.GetConn(connOpts) |
| 677 | if conn == nil { |
| 678 | return fmt.Errorf("connection not found: %s", connName) |
| 679 | } |
| 680 | return conn.InstallWsh(ctx, "") |
| 681 | } |
| 682 | |
| 683 | func (ws *WshServer) ConnUpdateWshCommand(ctx context.Context, remoteInfo wshrpc.RemoteInfo) (bool, error) { |
| 684 | handler := wshutil.GetRpcResponseHandlerFromContext(ctx) |
nothing calls this directly
no test coverage detected