Commit a1edaef
authored
🤖 Remove sync fs operations and path-finding from runtime (#447)
Eliminates blocking filesystem operations in the runtime layer and
removes unnecessary path-finding complexity.
## Changes
**Removed sync fs operations:**
- Replaced `fs.existsSync()` + `fs.mkdirSync()` with
`fsPromises.access()` + `fsPromises.mkdir()` in `LocalRuntime.ts`
- All filesystem operations in runtime are now async, preventing main
thread blocking
**Removed path-finding module:**
- Deleted `executablePaths.ts` (57 lines) that was checking hardcoded
paths for `bash` and `nice`
- Updated `LocalRuntime.ts` and `SSHRuntime.ts` to rely on system PATH
- Simplifies codebase by 74 lines total
## Verification
- ✅ TypeScript compilation passes
- ✅ All unit tests pass (same results as before)
- ✅ No sync fs operations remain in runtime files
_Generated with `cmux`_1 parent 9db5f11 commit a1edaef
File tree
3 files changed
+12
-74
lines changed- src/runtime
3 files changed
+12
-74
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 55 | | |
61 | | - | |
| 56 | + | |
| 57 | + | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
| |||
328 | 324 | | |
329 | 325 | | |
330 | 326 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
335 | 331 | | |
336 | 332 | | |
337 | 333 | | |
338 | | - | |
339 | | - | |
| 334 | + | |
| 335 | + | |
340 | 336 | | |
341 | 337 | | |
342 | 338 | | |
343 | 339 | | |
| 340 | + | |
| 341 | + | |
344 | 342 | | |
345 | 343 | | |
346 | 344 | | |
| |||
419 | 417 | | |
420 | 418 | | |
421 | 419 | | |
422 | | - | |
423 | | - | |
| 420 | + | |
424 | 421 | | |
425 | 422 | | |
426 | 423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
434 | | - | |
435 | | - | |
| 433 | + | |
436 | 434 | | |
437 | 435 | | |
438 | 436 | | |
| |||
This file was deleted.
0 commit comments