(ctx context.Context, clientDisplayName string, remoteInfo *wshrpc.RemoteInfo)
| 601 | `) |
| 602 | |
| 603 | func (conn *SSHConn) UpdateWsh(ctx context.Context, clientDisplayName string, remoteInfo *wshrpc.RemoteInfo) error { |
| 604 | conn.Infof(ctx, "attempting to update wsh for connection %s (os:%s arch:%s version:%s)\n", |
| 605 | conn.GetName(), remoteInfo.ClientOs, remoteInfo.ClientArch, remoteInfo.ClientVersion) |
| 606 | client := conn.GetClient() |
| 607 | if client == nil { |
| 608 | return fmt.Errorf("cannot update wsh: ssh client is not connected") |
| 609 | } |
| 610 | err := remote.CpWshToRemote(ctx, client, remoteInfo.ClientOs, remoteInfo.ClientArch) |
| 611 | if err != nil { |
| 612 | return fmt.Errorf("error installing wsh to remote: %w", err) |
| 613 | } |
| 614 | conn.Infof(ctx, "successfully updated wsh on %s\n", conn.GetName()) |
| 615 | return nil |
| 616 | |
| 617 | } |
| 618 | |
| 619 | // returns (allowed, error) |
| 620 | func (conn *SSHConn) getPermissionToInstallWsh(ctx context.Context, clientDisplayName string) (bool, error) { |
nothing calls this directly
no test coverage detected