MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / docker

Function docker

console/src/test/sql/mzcompose.ts:92–113  ·  view source on GitHub ↗
(
  command: string,
  options: string[] = [],
  input?: string,
)

Source from the content-addressed store, hash-verified

90}
91
92export async function docker(
93 command: string,
94 options: string[] = [],
95 input?: string,
96) {
97 return new Promise<{ stdout: string; stderr: string }>((resolve, reject) => {
98 const childProccess = exec(
99 `docker ${command} ${options.join(" ")}`,
100 (error, stdout, stderr) => {
101 if (error) {
102 reject({ error, stdout, stderr });
103 return;
104 }
105 resolve({ stdout, stderr });
106 },
107 );
108 if (input) {
109 childProccess.stdin?.write(input);
110 childProccess.stdin?.end();
111 }
112 });
113}
114
115export async function mzcompose(command: string, input?: string) {
116 return new Promise<{ stdout: string; stderr: string }>((resolve, reject) => {

Callers 1

testdriveFunction · 0.85

Calls 3

resolveFunction · 0.85
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected