Skip to content

Follow a skills directory that is itself a symlink - #20256

Closed
AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:fix/issue-20106
Closed

AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:fix/issue-20106

Conversation

@AnPod

@AnPod AnPod commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #20106

Problem: omarchy dev link aborts with ln: target '~/.claude/skills': Not a directory when a harness skills directory is a symlink to a folder, as dotfile managers commonly make it. #19913 replaced the per-skill ln -sfn "$skill" "$link" with one batched ln -sfn -t "$dir" -- call, and that call treats the symlink as the thing to replace instead of the folder behind it. Under set -euo pipefail the remaining harness directories are never linked, and omarchy dev unlink and first-login provisioning abort too, since all three go through omarchy-agent-skills-link.

Fix: put a trailing slash on the target, ln -sfn -t "$dir/" -- "${pending[@]}". The slash makes ln resolve a skills directory that is itself a symlink, while -n still keeps it from following the per-skill links inside it.

Test: test/shell.d/provision-user-test.sh now sets up .codex/skills as a symlink to a real folder outside the harness dirs and asserts the Omarchy skill link lands behind the symlink. The test goes red on the unpatched script with the issue's Not a directory error and passes with the fix; no caller needs a change.

omacom#19913 batched the per-skill ln into one `ln -sfn -t "$dir" --` call, and
that call fails with "Not a directory" when a harness skills directory is
a symlink to a folder, aborting `omarchy dev link` halfway through. A
trailing slash on the target makes ln resolve the symlink, while -n still
keeps it from following the per-skill links inside.

Fixes omacom#20106
@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · This PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Makes omarchy-agent-skills-link follow a harness skills directory that is itself a symlink.

  • Omarchy skills now link through symlinked harness folders.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "Follow a skills directory that is itself..." · Reviewed by Greptile

@omarchybot omarchybot added the bug Something isn't working label Nov 26, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks, @AnPod. This duplicates the earlier open PR #20111: both target quattro, add the same trailing slash to ln's target directory, and cover the symlinked skills-directory failure from #20106 with a regression test.

GPT-6 High in Codex compared both complete diffs, the linked issue and the helper's callers. Opus 5.5 High checked the two diffs and agreed they make the same change; independence is not guaranteed. No code was run for this duplicate comparison.

Closing this in favor of #20111. It can be reopened if this includes something the earlier PR misses.

@omarchybot omarchybot added the duplicate This issue or pull request already exists label Nov 26, 2026
@omarchybot omarchybot closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-agent-skills-link fails with 'Not a directory' when a harness skills dir is a symlink

2 participants