(attempts: number)
| 299 | }; |
| 300 | |
| 301 | const waitSshUp = async (attempts: number): Promise<boolean> => { |
| 302 | for (let i = 0; i < attempts; i++) { |
| 303 | if ((await ssh(os === "windows" ? "echo ok" : "true")).code === 0) return true; |
| 304 | await sleep(5000); |
| 305 | } |
| 306 | return false; |
| 307 | }; |
| 308 | |
| 309 | const waitSshDown = async (attempts = 40): Promise<void> => { |
| 310 | for (let i = 0; i < attempts; i++) { |