()
| 641 | } |
| 642 | |
| 643 | function runReset() { |
| 644 | if (!acquireLock()) { |
| 645 | console.error('[watch] Could not acquire state lock; a scan may be running. Try again shortly.'); |
| 646 | process.exit(1); |
| 647 | } |
| 648 | try { |
| 649 | writeState(defaultState()); |
| 650 | } finally { |
| 651 | releaseLock(); |
| 652 | } |
| 653 | console.log('[watch] State reset. Next scan will use HEAD~1 as baseline.'); |
| 654 | process.exit(0); |
| 655 | } |
| 656 | |
| 657 | // -- Main --------------------------------------------------------------------- |
| 658 |
no test coverage detected