diff --git a/CHANGELOG.md b/CHANGELOG.md index 776d9f8..b90fd6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this ## [Unreleased] +### Fixed + +- The integration test helper now canonicalizes its temporary repository path. On macOS `mktemp -d` returns a `/var` path while git records the resolved `/private/var` one, so `cmd_clean --merged uses nested registered worktree path` compared two spellings of the same directory and failed locally while passing in CI. + ## [2.11.1] - 2026-09-14 ### Changed diff --git a/tests/test_helper.bash b/tests/test_helper.bash index 1a5c2ae..6e4ada1 100644 --- a/tests/test_helper.bash +++ b/tests/test_helper.bash @@ -23,7 +23,9 @@ export -f cfg_default cfg_get_all # Set up a disposable git repo for integration tests # Sets: TEST_REPO, TEST_WORKTREES_DIR setup_integration_repo() { - TEST_REPO=$(mktemp -d) + # Canonicalize: on macOS mktemp -d returns a /var path while git records the + # resolved /private/var one, so uncanonicalized paths never compare equal. + TEST_REPO=$(cd -P "$(mktemp -d)" && pwd) TEST_WORKTREES_DIR="${TEST_REPO}-worktrees" git -C "$TEST_REPO" init --quiet git -C "$TEST_REPO" config user.name "Test User"