-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misleading error message for site commands #1488
Comments
Something like the following could help probs? (But with additional changes of course - especially replace EXECV usages) frappe_commands = get_frappe_commands()
frappe_command_exists = cmd_from_sys in frappe_commands
if frappe_command_exists:
frappe_cmd()
try:
app_cmd()
except Exception:
from difflib import get_close_matches
possibilities = get_close_matches(cmd_from_sys, frappe_commands)
if possibilities:
raise NoSuchOption(cmd_from_sys, possibilities=possibilities)
raise |
This fixes the problem, MILDLY breaking but I doubt anyone uses internal
|
Wait, the help message is still misleading... little less than before 😆
We can probably handle error message in Framework. |
@bosue that one is practically unfixable. |
Here the error should be "migrat" command not found, click usually gets typos and suggest right one but our site arg modification is probably messing with it.
Related code:
bench/bench/cli.py
Lines 134 to 138 in dcae3e3
If we merge frappe and app commands it kind works, but that will likely break other things.
The text was updated successfully, but these errors were encountered: