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

Function fetchIp

e2e/src/vm/tart.ts:116–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114 let ip = "";
115
116 const fetchIp = async (): Promise<boolean> => {
117 for (let i = 0; i < 90; i++) {
118 try {
119 const { stdout } = await execFileP(TART, ["ip", name]);
120 if (stdout.trim()) {
121 ip = stdout.trim();
122 return true;
123 }
124 } catch {
125 /* not booted yet */
126 }
127 await sleep(2000);
128 }
129 return false;
130 };
131
132 // Linux systemctl --user calls need XDG_RUNTIME_DIR; harmless elsewhere.
133 const wrap = (command: string): string =>

Callers 1

tartVmFunction · 0.85

Calls 1

sleepFunction · 0.90

Tested by

no test coverage detected