Lockyer
790c42505a
fix(redact): tolerate EEXIST from recursive mkdir in install-prepush-hook on bun/Windows ( #2635 )
...
fs.mkdirSync(dir, { recursive: true }) is a no-op on an existing directory
in Node, but bun on Windows throws EEXIST - crashing hook install on any
repo whose .git/hooks already existed, leaving the repo unprotected.
Add lib/fs-utils.ts mkdirpSync: swallow EEXIST only when statSync confirms
the path is an existing directory; a regular file occupying the path, a
stat failure, or any other errno still rethrows. Use it in
installPrepushHook().
The regression test emulates the Windows bun fs semantics via a
bun --preload fixture, so the exact crash path runs (and fails on the old
code) on any platform, including CI Linux.
Absorbed from PR #2641 with authorship preserved.
Fixes #2635
2026-08-22 01:57:28 +00:00
..
2026-08-19 16:53:19 -07:00
2026-06-09 22:29:23 -07:00
2026-03-19 17:21:05 -07:00
2026-08-16 19:34:41 -07:00
2026-05-21 21:21:07 -07:00
2026-08-19 11:42:55 -07:00
2026-08-15 11:42:19 -07:00
2026-08-19 11:42:55 -07:00
2026-08-14 09:28:56 -07:00
2026-08-19 11:42:55 -07:00
2026-08-19 11:42:55 -07:00
2026-04-18 15:05:42 +08:00
2026-08-15 11:42:19 -07:00
2026-08-16 19:34:41 -07:00
2026-08-15 09:37:04 -07:00
2026-08-14 09:28:56 -07:00
2026-08-19 16:53:19 -07:00
2026-08-15 11:42:19 -07:00
2026-08-15 11:42:19 -07:00
2026-06-08 06:20:58 -07:00
2026-06-14 11:40:57 -07:00
2026-08-14 22:02:07 -07:00
2026-08-16 19:34:41 -07:00
2026-05-28 18:21:09 -07:00
2026-08-15 11:42:19 -07:00
2026-08-17 07:50:37 -07:00
2026-08-14 09:28:56 -07:00
2026-08-14 09:28:56 -07:00
2026-08-22 01:56:34 +00:00
2026-03-26 11:15:24 -06:00
2026-06-25 09:42:45 -07:00
2026-08-16 19:34:41 -07:00
2026-08-16 19:34:41 -07:00
2026-05-21 21:21:07 -07:00
2026-08-14 09:28:56 -07:00
2026-08-19 11:42:55 -07:00
2026-08-19 11:42:55 -07:00
2026-08-15 22:20:30 -07:00
2026-04-24 01:38:21 -07:00
2026-08-16 19:34:41 -07:00
2026-05-20 06:56:41 -07:00
2026-05-21 16:09:26 -07:00
2026-05-21 16:09:26 -07:00
2026-07-14 16:35:30 -07:00
2026-08-16 09:53:31 -07:00
2026-05-30 14:57:07 -07:00
2026-06-21 07:15:19 -07:00
2026-06-08 06:39:38 -07:00
2026-08-19 11:42:55 -07:00
2026-08-14 22:02:07 -07:00
2026-08-19 11:42:55 -07:00
2026-03-30 22:25:46 -06:00
2026-08-15 11:42:19 -07:00
2026-08-14 22:02:07 -07:00
2026-08-14 22:02:07 -07:00
2026-08-19 11:42:55 -07:00
2026-08-22 01:57:28 +00:00
2026-08-16 19:34:41 -07:00
2026-08-16 19:34:41 -07:00
2026-08-16 19:34:41 -07:00
2026-08-16 09:53:31 -07:00
2026-08-16 09:53:31 -07:00
2026-08-14 09:28:56 -07:00
2026-06-07 21:38:21 -07:00
2026-08-19 11:42:55 -07:00
2026-08-19 16:53:19 -07:00
2026-08-19 11:42:55 -07:00
2026-04-04 22:46:21 -07:00
2026-04-19 17:50:31 +08:00
2026-08-16 19:34:41 -07:00
2026-08-15 11:42:19 -07:00
2026-08-15 11:42:19 -07:00
2026-05-06 19:37:53 -07:00
2026-05-25 10:57:15 -07:00
2026-08-19 16:53:19 -07:00
2026-08-14 22:02:07 -07:00
2026-08-15 11:42:19 -07:00
2026-08-19 11:42:55 -07:00
2026-08-16 09:53:31 -07:00