Commit 033291b
committed
fix(cli): gracefully exit when user declines to fork session from another project
When --resume <session-id> targets a session in a different project,
the CLI prompts whether to fork into the current directory. If the
user answers 'n', the previous code threw an uncaught Error that
bubbled up as an ugly stack trace.
Instead, return undefined from createSessionManager and handle it in
runRootCommand by printing a dimmed message and returning cleanly.
Fixes the uncaught exception:
Error: Session "..." is in another project (C:\tmp).
at createSessionManager (.../main.ts:407:16)1 parent 159f2d8 commit 033291b
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
855 | | - | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
856 | 861 | | |
857 | 862 | | |
858 | 863 | | |
| |||
0 commit comments