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

Function ssh

e2e/cli/custom-tools-packed.test.ts:66–81  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

64};
65
66const 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
83const fixturePath = (slug: string): string =>
84 guestOs() === "windows"

Callers 2

writeFixtureFunction · 0.70
removeFixtureFunction · 0.70

Calls 1

sshInvocationFunction · 0.70

Tested by

no test coverage detected