(child, trigger)
| 170 | let restarting = false; |
| 171 | |
| 172 | async function restart(child, trigger) { |
| 173 | if (restarting) return; |
| 174 | restarting = true; |
| 175 | try { |
| 176 | if (!kPreserveOutput) process.stdout.write(clear); |
| 177 | if (trigger) { |
| 178 | process.stdout.write(`${blue}Change detected in ${inspect(trigger)}${white}\n`); |
| 179 | } |
| 180 | process.stdout.write(`${green}Restarting ${kCommandStr}${white}\n`); |
| 181 | await stop(child); |
| 182 | return start(); |
| 183 | } finally { |
| 184 | restarting = false; |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | async function init() { |
| 189 | let child = start(); |
no test coverage detected
searching dependent graphs…