Commit 9d5e295
authored
Prevent REPL command dispatch loop (#3576)
* Prevent REPL command dispatch loop
The problem: The interactive shell recursively invokes the root command
for each line. The active command is stored in a private context value,
so reusing the outer context without filtering makes the nested command
inherit itself as its parent and causes command dispatch to loop
indefinitely after input is submitted.
The fix: This patch wraps the REPL dispatch context to hide
active-command while preserving the application context. This avoids the
infinite loop and allows command dispatch to execute normally.
Signed-off-by: James Vasile <james@jamesvasile.com>
* Add //nolint
---------
Signed-off-by: James Vasile <james@jamesvasile.com>1 parent 61e6a7b commit 9d5e295
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
150 | 165 | | |
151 | 166 | | |
152 | 167 | | |
| |||
0 commit comments