Commit 9c44d45
authored
fix(openclaw): resolve installation failure on Windows with spaces in path (#12977)
### What this PR does
Before this PR:
- OpenClaw installation/uninstallation failed on Windows when the npm
command path contained spaces (e.g., "C:\Program Files\nodejs\npm.cmd").
After this PR:
- OpenClawService.install() and OpenClawService.uninstall() use spawn
with shell: true when the npm path contains spaces, fixing the Windows
installation failure.
Fixes #12945, #12935, #12963
### Why we need it and why it was done in this way
- Using spawn with shell:true for npm paths containing spaces ensures
the command is executed correctly on Windows without changing
crossPlatformSpawn or other callers.
- Scope limited to install() and uninstall() to minimize impact.
### Breaking changes
- None.
### Special notes for your reviewer
- Change is minimal and targeted to OpenClawService install/uninstall
logic.
### Checklist
- [x] PR: The PR description is expressive enough and will help future
contributors
- [x] Code: Write code that humans can understand and Keep it simple
- [ ] Refactor: Left the code cleaner than you found it
- [ ] Upgrade: Impact of this change on upgrade flows was considered
- [x] Documentation: No user-guide update required
Release note
```release-note
fix(openclaw): handle npm paths with spaces on Windows during install/uninstall
```1 parent 38c29c1 commit 9c44d45
1 file changed
+14
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
252 | 256 | | |
253 | 257 | | |
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
257 | | - | |
| 261 | + | |
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
| |||
346 | 350 | | |
347 | 351 | | |
348 | 352 | | |
349 | | - | |
350 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
351 | 359 | | |
352 | 360 | | |
353 | 361 | | |
354 | 362 | | |
355 | 363 | | |
356 | | - | |
| 364 | + | |
357 | 365 | | |
358 | 366 | | |
359 | 367 | | |
| |||
0 commit comments