()
| 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 => |