Skip to content

test: resolve the temp repo path so specs pass on macos - #432

Merged
barrettruth merged 1 commit into
mainfrom
resolve-temp-repo-paths
Aug 15, 2026
Merged

test: resolve the temp repo path so specs pass on macos#432
barrettruth merged 1 commit into
mainfrom
resolve-temp-repo-paths

Conversation

@barrettruth

Copy link
Copy Markdown
Owner

Problem

26 specs fail on macOS and pass on Linux: 16 failures and 10 errors across
actions_spec, commands_spec and render_spec.

vim.fn.tempname() returns a path under /var/folders/..., and on macOS /var is
a symlink to /private/var. Git resolves it, the spec does not, so the two disagree
about where the repo is:

tempname()    = /var/folders/.../PF65FX/0
git toplevel  = /private/var/folders/.../PF65FX/0

Confirmed by building the same fixture both ways — with the unresolved path the
rendered diff has no deleted file mode line, with the resolved one it does. Linux
tempname() gives /tmp/... with no symlink, which is why CI never saw it.

Solution

Resolve the path where the fixture is created: vim.fn.resolve(vim.fn.tempname()),
14 sites across 8 spec files. resolve handles the not-yet-created leaf, resolving
the parent symlinks.

Applied to every tempname() in spec/, not only the failing three, so the next
git-backed fixture does not reintroduce it.

802 successes / 0 failures / 0 errors, up from 776/16/10. No change to lua/.

@barrettruth
barrettruth merged commit 901b9c7 into main Aug 15, 2026
5 checks passed
@barrettruth
barrettruth deleted the resolve-temp-repo-paths branch August 15, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant