Skip to content

fix: correct skills directory path resolution in getSkillsDir#79

Merged
nicknisi merged 2 commits intomainfrom
nicknisi/install-skills
Mar 5, 2026
Merged

fix: correct skills directory path resolution in getSkillsDir#79
nicknisi merged 2 commits intomainfrom
nicknisi/install-skills

Conversation

@nicknisi
Copy link
Copy Markdown
Member

@nicknisi nicknisi commented Mar 5, 2026

Summary

  • Fixes ENOENT: no such file or directory, scandir error when running workos install-skill
  • getSkillsDir() walked up 3 parent directories assuming dist/src/commands/ output structure, but tsconfig.json has rootDir: "./src" which strips the src/ prefix, producing dist/commands/. The extra .. caused the path to overshoot the repo root.

Test plan

  • All 978 existing tests pass
  • Run workos install-skill --list and verify it discovers skills
  • Run workos install-skill and verify skills install to detected agents

nicknisi added 2 commits March 5, 2026 11:29
The path walked up 3 levels assuming dist/src/commands/ structure, but
tsconfig rootDir strips the src/ prefix, producing dist/commands/. This
caused ENOENT when running install-skill.
Walks up to package.json instead of counting '../' segments from
compiled output. Prevents path resolution from silently breaking
when tsconfig output structure changes.
@nicknisi nicknisi merged commit 732bcaa into main Mar 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant