fix(hooks): make realpath work cross-platform #9

Merged
SethFalco merged 5 commits from macos-support into main 2026-06-15 14:26:01 +01:00
SethFalco commented 2026-06-15 14:24:57 +01:00 (Migrated from gitlab.com)

See commit message(s).


I recently received a MacBook (macOS) device as one of my clients required I test some things on it. Turns out, some of my Claude hooks didn't work on macOS, so this makes some changes to maintain parity between Linux and macOS.

Notable changes:

  • /tmp (Linux) vs. /private/tmp and $TMPDIR (macOS)
  • macOS ships with the FreeBSD implementation of realpath but the -m argument is implemented in the GNU implementation.

Unfortunately GitLab doesn't have macOS runners on the free plan, but locally I had 13 failing tests before when I did make test, now there are 6 left, meanwhile GitLab's Linux runners are all green. I'll fix the remaining tests in a separate PR.

See commit message(s). --- I recently received a MacBook (macOS) device as one of my clients required I test some things on it. Turns out, some of my Claude hooks didn't work on macOS, so this makes some changes to maintain parity between Linux and macOS. Notable changes: * `/tmp` (Linux) vs. `/private/tmp` and `$TMPDIR` (macOS) * macOS ships with the FreeBSD implementation of `realpath` but the `-m` argument is implemented in the GNU implementation. Unfortunately GitLab doesn't have macOS runners on the free plan, but locally I had 13 failing tests before when I did `make test`, now there are 6 left, meanwhile GitLab's Linux runners are all green. I'll fix the remaining tests in a separate PR.
SethFalco (Migrated from gitlab.com) merged commit ec9c657081 into main 2026-06-15 14:26:02 +01:00
SethFalco commented 2026-06-15 14:26:16 +01:00 (Migrated from gitlab.com)

mentioned in commit ec9c657081

mentioned in commit ec9c65708110e90044f4e611b68f3bf768269cd8
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ai/claude-config!9
No description provided.