(command: string)
| 122 | } |
| 123 | |
| 124 | async function executeSSH(command: string): Promise<string> { |
| 125 | if (!sshConfig) { |
| 126 | throw new Error("SSH config not ready"); |
| 127 | } |
| 128 | |
| 129 | using proc = execAsync( |
| 130 | `ssh -i "${sshConfig.privateKeyPath}" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -o ConnectTimeout=2 -p ${sshConfig.port} testuser@localhost '${command}'` |
| 131 | ); |
| 132 | const { stdout } = await proc.result; |
| 133 | return stdout.trim(); |
| 134 | } |
| 135 | |
| 136 | async function clearMarkerFile(runtimeType: "local" | "ssh", markerPath: string): Promise<void> { |
| 137 | if (runtimeType === "ssh") { |
no test coverage detected