Commit 0c3932f
committed
path: Search
Part of #120, and similar to #122, searching the local `_GO_SCRIPT_DIR`
before plugin dirs seems like a more natural and scalable model.
`_GO_CORE_DIR/libexec` for builtins still comes first.
The idea behind this model is that when reading a script within the
`./go` script framework, it should be clear that:
- core framework scripts are the same everywhere; they can't be shadowed
by scripts with the same name
- project-local scripts take precedence before any plugin scripts
The implications of this last point are that:
- a script that is installed as a plugin will find its own scripts
before those that share the same name with other installed plugins,
avoiding collisions and possibly obscure bugs
- the parent project can determine the precedence of plugin scripts
sharing the same name, as the plugins can be installed using directory
names that force a particular order (e.g. '00-', '01-', '02-'
prefixes).
- as an alternative to the approach in the preceding point, the parent
project can potentially resolve conflicts by installing its own
scripts that then delegate to a specific plugin script
And to this last point, I've filed #127 to facilitate help text
discovery._GO_SCRIPTS_DIR before plugin dirs1 parent 96fe117 commit 0c3932f
3 files changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
0 commit comments