Commit db095b7
committed
fix: handle empty workspaceFolders array to prevent path type error
- Fix getWorkspacePath() in src/utils/path.ts to check array length before accessing
- Fix getCwd() in FileContextTracker to check array length before accessing
- Fix cwd assignment in claude-code/run.ts to check array length before accessing
This prevents 'path argument must be of type string. Received an instance of Array' error
when workspaceFolders is an empty array.
Fixes #76951 parent 90e7d09 commit db095b7
File tree
3 files changed
+9
-3
lines changed- src
- core/context-tracking
- integrations/claude-code
- utils
3 files changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
0 commit comments