Commit 6af2900
committed
commands: Don't raise error for duplicate commands
While trying to create a test case for #131 and #132 to demonstrate that
setting the `_GO_SCRIPTS_DIR` for a plugin incorrectly may cause it to
find the wrong command scripts, the test exited with an error at some
point because of the constraint that no duplicate scripts are allowed
by `_@go.find_commands` (via `_@go.merge_scripts_into_list`).
Since plugins may contain command names that match those in other
plugins or the top-level `_GO_SCRIPTS_DIR`, and since `_GO_SEARCH_PATHS`
has the correct semantics with regard to which command should take
precedence for any given script, I realized raising an error was no
longer appropriate. Now the first command found via searching
`_GO_SEARCH_PATHS` takes precedence over duplicates in later paths.1 parent 2b8f09f commit 6af2900
2 files changed
+12
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 59 | + | |
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
| |||
0 commit comments