2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

perf: Remove unwanted check (#788)

`get_frappe_commands` returns a list of valid frappe commands which is used to check if the user command is valid. But this is unnecessary because even without it bench can report the command not found error. This saves ~1 second.
This commit is contained in:
Suraj Shetty 2019-04-12 21:03:15 +05:30 committed by Faris Ansari
parent 2435cb6b2e
commit 431e96909c

View File

@ -19,7 +19,7 @@ def cli():
if len(sys.argv) > 2 and sys.argv[1] == "frappe":
return old_frappe_cli()
elif len(sys.argv) > 1 and sys.argv[1] in get_frappe_commands():
elif len(sys.argv) > 1:
return frappe_cmd()
elif len(sys.argv) > 1 and sys.argv[1] in ("--site", "--verbose", "--force", "--profile"):