(command: string)
| 64 | }; |
| 65 | |
| 66 | const ssh = async (command: string): Promise<{ stdout: string; stderr: string; code: number }> => { |
| 67 | const invocation = sshInvocation(command); |
| 68 | try { |
| 69 | const { stdout, stderr } = await execFileAsync(invocation.command, [...invocation.args], { |
| 70 | maxBuffer: 64 * 1024 * 1024, |
| 71 | }); |
| 72 | return { stdout, stderr, code: 0 }; |
| 73 | } catch (error) { |
| 74 | const err = error as { stdout?: string; stderr?: string; code?: number }; |
| 75 | return { |
| 76 | stdout: err.stdout ?? "", |
| 77 | stderr: err.stderr ?? "", |
| 78 | code: typeof err.code === "number" ? err.code : 1, |
| 79 | }; |
| 80 | } |
| 81 | }; |
| 82 | |
| 83 | const fixturePath = (slug: string): string => |
| 84 | guestOs() === "windows" |
no test coverage detected