Skip to content

Commit 04705fb

Browse files
authored
chore: update script to use the right path (#122)
1 parent c5fbdd6 commit 04705fb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎scripts/link-agent-skills.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
3030
cd "$root"
3131

3232
source_skills=".agents/skills"
33+
relative_source_skills="../${source_skills}"
3334

3435
confirm_optional_symlink() {
3536
local agent_name="$1"
@@ -98,7 +99,7 @@ esac
9899

99100
if [[ -L "$link_path" ]]; then
100101
current_target="$(readlink "$link_path")"
101-
if [[ "$current_target" == "$source_skills" || "$current_target" == "../agents/skills" ]]; then
102+
if [[ "$current_target" == "$relative_source_skills" || "$current_target" == "$source_skills" ]]; then
102103
echo "already linked: $link_path -> $source_skills"
103104
exit 0
104105
fi
@@ -111,5 +112,5 @@ elif [[ "$agent" == "cursor" || "$agent" == "codex" ]]; then
111112
fi
112113

113114
mkdir -p "$(dirname "$link_path")"
114-
ln -s "$source_skills" "$link_path"
115+
ln -s "$relative_source_skills" "$link_path"
115116
echo "linked: $link_path -> $source_skills"

0 commit comments

Comments
 (0)