-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The implementations so far were hacks that worked for the most used commands but broken down when challenged or expected to maintain documented usages [eg: custom app commands]. The current implementation consists of a two step approach: 1. figure out command name that user is trying to execute 2. pass the directive to the app (bench, frappe or other) that consists of the cmd --- For tackling #1, get_cmd_from_sysargv contains exhaustive rules that cover all (that i know and ive come across) combinations of valid frappe commands. For problem #2, a simple check in click's Group object does the trick. Tested with possible known commands with combinations of context flags and params, with bench, frappe & external app's commands
- Loading branch information
1 parent
beac865
commit a6f1964
Showing
2 changed files
with
68 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters