Commit e79daac
committed
fix: Resolve relative paths from cwd instead of git root
The linter was resolving relative paths from the git repository root
instead of the current working directory, causing relative paths like
'../skills/ui5-best-practices' to fail.
Changed both resolveSkillPaths() and validateSkillPath() to:
1. Resolve paths from process.cwd() (for relative paths)
2. Use git root only for workspace boundary validation
This matches standard CLI tool behavior where relative paths are
resolved from the user's current directory.
Fixes:
- 'npm test && node bin/skill-lint.js lint ../skills/ui5-best-practices'
- Multi-skill mode: 'node bin/skill-lint.js lint ../skills/'
- All relative path scenarios
Absolute paths continue to work as before.1 parent 5c473d5 commit e79daac
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
129 | 136 | | |
130 | 137 | | |
131 | 138 | | |
| |||
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
176 | | - | |
177 | | - | |
178 | | - | |
| 183 | + | |
| 184 | + | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
| |||
191 | 197 | | |
192 | 198 | | |
193 | 199 | | |
| 200 | + | |
194 | 201 | | |
195 | 202 | | |
196 | 203 | | |
| |||
0 commit comments