Commit ce0e24d
committed
Fix path expansion: return absolute path from createTempDirForStream
The previous implementation returned '~/.cmux-tmp/{token}' which is not
an absolute path. This would fail when passed to runtime.writeFile() in
LocalRuntime, as fs operations don't expand tilde.
Solution: Use 'mkdir -p ~/.cmux-tmp/{token} && cd ... && pwd' to get the
absolute path after creation. This works for both LocalRuntime and SSHRuntime:
- LocalRuntime: returns '/home/user/.cmux-tmp/{token}'
- SSHRuntime: returns '/home/remoteuser/.cmux-tmp/{token}' (remote path)
Also switched to execBuffered() helper for cleaner code.1 parent 9edb677 commit ce0e24d
1 file changed
+14
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
259 | 261 | | |
260 | 262 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
265 | 268 | | |
266 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
267 | 272 | | |
268 | 273 | | |
269 | 274 | | |
| |||
0 commit comments