Commit 6274bf0
committed
fix(dx-4439): show human-readable prompts after command correction
When an invalid command is corrected (e.g. loginasda → login), init had run
with the invalid command so context.messageFilePath was never set. Interactive
prompts then showed i18n keys (e.g. CLI_AUTH_LOGIN_ENTER_EMAIL_ADDRESS) instead
of messages (e.g. Enter your email address).
- Add prerun hook init-context-for-command that re-builds context and
re-initializes messageHandler/cliux/SDKs when messageFilePath is missing
and the actual command id is available (e.g. auth:login).
- Register the hook as the first prerun hook so it runs before other prerun logic.
Made-with: Cursor1 parent dd85f63 commit 6274bf0
2 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments