Repository navigation
Commit 3da07e2
committed
fix(oxlint-plugin): Resolve the oxlint bin without assuming a pnpm layout
The rule-harness tests spawned node_modules/.pnpm/node_modules/.bin/oxlint,
a pnpm virtual-store hoist path. oxlint is only a transitive dependency of
vite-plus, so no package manager guarantees a stable .bin shim for it: under
Bun-style hoisted installs that path does not exist, and the root
node_modules/.bin/oxlint is vite-plus's LSP-only wrapper, so all 35 rule
tests fail with spawn ENOENT. Resolve oxlint/package.json through vite-plus
instead, at module scope so a broken install fails once with a clear
resolution error, and run the package's own bin/oxlint through
process.execPath so the spawn does not depend on shebang support or
whichever node is first on PATH.1 parent df78cda commit 3da07e2
1 file changed
Lines changed: 18 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
12 | 23 | | |
13 | 24 | | |
14 | 25 | | |
| |||
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
115 | 122 | | |
116 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| |||
0 commit comments