(env)
| 27 | // basename differs from the default in that case (`evolver.pid` vs |
| 28 | // `instance.lock`). |
| 29 | function getLockFilePath(env) { |
| 30 | const e = env || process.env; |
| 31 | if (e.EVOLVER_LOCK_DIR) { |
| 32 | return path.join(e.EVOLVER_LOCK_DIR, 'evolver.pid'); |
| 33 | } |
| 34 | // os.homedir() is cross-platform; process.env.HOME is unset on Windows. |
| 35 | return path.join(os.homedir(), '.evomap', 'instance.lock'); |
| 36 | } |
| 37 | |
| 38 | // Round-9: lease tunables for the daemon lock. A live daemon refreshes the |
| 39 | // lock mtime every LOCK_REFRESH_MS; a lock whose mtime is older than |
no outgoing calls
no test coverage detected