MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / ssh

Function ssh

e2e/cli/service-install-takeover.test.ts:54–69  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

52};
53
54const 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
71const executorPath = (): string => {
72 const dir = process.env.E2E_CLI_BIN_DIR ?? (guestOs() === "windows" ? "C:/ed" : "~/ed");

Callers 4

waitForGuestHealthFunction · 0.70
listenerPidFunction · 0.70
startPredecessorFunction · 0.70

Calls 1

sshInvocationFunction · 0.70

Tested by

no test coverage detected