Commit 606858b
committed
fix(hooks): publish cached tool via ln, not mv
`mv` silently replaces an existing destination, so a slower sibling
process could still clobber a binary another process already
published and might be executing (surfaced as "fork/exec ...
(deleted): no such file or directory"). `ln` (hard link, no `-f`)
fails with EEXIST instead of overwriting, so publishing is now
atomically "first process wins, nobody else touches it" - the temp
dir's own `rm -rf` at the end still finishes the move to the binary's
only remaining name.
- Correct a comment that attributed the stdout-capture contract to
`populate_tool_cache` itself; it belongs to its caller
`resolve_tool_path`.
- Add the same `hooks/` existence guard `_run_hook` already has to
its sibling `_run_concurrent_hooks`, for the same packaging-
regression message instead of a confusing raw exit code.
Assisted-by: Sisyphus:claude-sonnet-5 opencode1 parent a812e80 commit 606858b
2 files changed
Lines changed: 18 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
592 | 593 | | |
593 | 594 | | |
594 | 595 | | |
| |||
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
613 | 609 | | |
614 | 610 | | |
615 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
355 | 360 | | |
356 | 361 | | |
357 | 362 | | |
| |||
0 commit comments