(command: string)
| 52 | }; |
| 53 | |
| 54 | const ssh = async (command: string): Promise<{ stdout: string; stderr: string; code: number }> => { |
| 55 | const invocation = sshInvocation(command); |
| 56 | try { |
| 57 | const { stdout, stderr } = await execFileAsync(invocation.command, [...invocation.args], { |
| 58 | maxBuffer: 32 * 1024 * 1024, |
| 59 | }); |
| 60 | return { stdout, stderr, code: 0 }; |
| 61 | } catch (error) { |
| 62 | const err = error as { stdout?: string; stderr?: string; code?: number }; |
| 63 | return { |
| 64 | stdout: err.stdout ?? "", |
| 65 | stderr: err.stderr ?? "", |
| 66 | code: typeof err.code === "number" ? err.code : 1, |
| 67 | }; |
| 68 | } |
| 69 | }; |
| 70 | |
| 71 | const executorPath = (): string => { |
| 72 | const dir = process.env.E2E_CLI_BIN_DIR ?? (guestOs() === "windows" ? "C:/ed" : "~/ed"); |
no test coverage detected