fix(cli): restart stale clients after updates

This commit is contained in:
Kit Langton 2026-07-05 13:31:19 -04:00
commit 910af9a122
13 changed files with 246 additions and 25 deletions

View file

@ -0,0 +1,6 @@
const stateFile = process.argv[2]
const exit = Number(process.argv[3])
const count = (await Bun.file(stateFile).exists()) ? Number(await Bun.file(stateFile).text()) : 0
await Bun.write(stateFile, String(count + 1))
process.exit(exit || (count === 0 ? 75 : 0))