Repository navigation
Commit cd8095c
feat(windows): scaffolding pass for Windows support
First-pass changes to let pkgm at least start on Windows so CI can
surface real gaps instead of failing at "/usr/local doesn't exist":
- standardPath(): add Windows case returning the baseline System32 /
System32\Wbem dirs joined with `;`. Introduces PATH_SEP module
constant used wherever we tokenise $PATH (a literal `:` split would
shred `C:\` drive prefixes on Windows).
- install_prefix(): on Windows, skip the /usr/local probe and return
Path.home()/.local. System-wide installs under %ProgramFiles% need
UAC modelling — out of scope here.
- get_pkgx(): use PATH_SEP and look for `pkgx.exe` on Windows.
- install() PATH-contains check: use PATH_SEP.
- Stub writing: skip the Deno.chmod(0o755) on Windows (it throws).
The stub content is still POSIX shell — proper `.cmd`/`.ps1` stub
emission is a follow-up.
- CI: add windows-latest to the `test` matrix with
`strategy.fail-fast: false`. The existing `continue-on-error: true`
keeps the matrix overall green; the Windows leg surfaces what's
still broken so we can iterate.
Open design questions deliberately left for the draft-PR description:
- System-wide install prefix on Windows (%ProgramFiles%? user-only?)
- Elevation model (UAC? refuse?)
- Stub format (.cmd, .ps1, or compiled wrapper?)
- libpkgx + pkgxdev/setup Windows-readiness verification
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4ffae15 commit cd8095c
2 files changed
Lines changed: 40 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
17 | 33 | | |
18 | 34 | | |
19 | 35 | | |
| |||
194 | 210 | | |
195 | 211 | | |
196 | 212 | | |
197 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
198 | 219 | | |
199 | 220 | | |
200 | 221 | | |
| |||
204 | 225 | | |
205 | 226 | | |
206 | 227 | | |
207 | | - | |
| 228 | + | |
208 | 229 | | |
209 | 230 | | |
210 | 231 | | |
| |||
518 | 539 | | |
519 | 540 | | |
520 | 541 | | |
521 | | - | |
522 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
523 | 545 | | |
524 | 546 | | |
525 | 547 | | |
| |||
758 | 780 | | |
759 | 781 | | |
760 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
761 | 791 | | |
762 | 792 | | |
763 | 793 | | |
| |||
0 commit comments