Commit 0ba6947
Add tilde expansion for TUI args after removing shell layer
Since sh -c was removed to fix command injection, ~/foo paths entered
in the TUI are no longer expanded by a shell. This adds a narrow
expandTilde helper that replaces a leading ~ with os.UserHomeDir()
before exec, restoring path resolution without reintroducing any
shell interpretation.
Guards against empty $HOME to prevent ~/foo silently resolving to /foo.
Made-with: Cursor1 parent 287c3d0 commit 0ba6947
1 file changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
283 | 305 | | |
284 | 306 | | |
285 | 307 | | |
| |||
308 | 330 | | |
309 | 331 | | |
310 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
311 | 338 | | |
312 | 339 | | |
313 | 340 | | |
| |||
0 commit comments