fix: gitlab subgroup URLs, universal-only global symlinks, and symlinked agent dirs#301
Merged
fix: gitlab subgroup URLs, universal-only global symlinks, and symlinked agent dirs#301
Conversation
…ked agent dirs - Fix GitLab URL parsing to support nested subgroups (e.g. gitlab.com/group/subgroup/repo) - Skip agent-specific symlinks for universal agents on global install to avoid duplicates - Resolve parent symlinks before computing relative paths to prevent broken symlinks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three bugs:
1. GitLab URLs with nested subgroups fail to clone
src/source-parser.ts:212— The regex only captured two path segments (owner/repo), sohttps://gitlab.com/coresofthq/ai/agent-skillswas parsed ashttps://gitlab.com/coresofthq/ai.git, droppingagent-skills. Fixed the regex to capture the full path, supporting arbitrarily deep GitLab subgroups.2. Universal-only global install creates duplicate symlinks (#294)
src/installer.ts(all 4 install functions) — When only universal agents were selected for a global install, the installer still created symlinks to agent-specific global dirs (e.g.,~/.copilot/skills), causing skills to appear twice in GitHub Copilot. Fixed by skipping the agent-specific symlink for universal agents on global installs, since the skill is already in the canonical~/.agents/skills.3. Installation fails when
~/.claude/skillsis a symlink (#293)src/installer.ts(createSymlink) — When~/.claude/skillswas symlinked to~/.agents/skills, the installer computed relative paths from the symlink path rather than the real filesystem path, producing broken symlinks like../../.agents/skills. Fixed by resolving symlinks in parent directories viafs.realpathbefore comparing paths and computing relative targets.