(targetPath, fn)
| 91 | } |
| 92 | |
| 93 | function withFileLock(targetPath, fn) { |
| 94 | const lockPath = _acquireLock(targetPath); |
| 95 | try { |
| 96 | return fn(); |
| 97 | } finally { |
| 98 | _releaseLock(lockPath); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | function readJsonIfExists(filePath, fallback) { |
| 103 | try { |
no test coverage detected