core, path: Refactor plugin path handling #131
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I realized the
while true
loop from_@go.run_plugin_command_script
could live comfortably in_@go.set_search_paths
and handle the top-level_GO_PLUGINS_PATHS
case as well.Also, I realized that there was no need for
@go
to invoke_@go.run_plugin_command_script
if the command script in question was from the_GO_SCRIPTS_DIR
of the current plugin and not in_GO_SCRIPTS_DIR/plugins
.Plus, there was a bug whereby it'd been presumed that the plugin command path would always reside in the top-level
_GO_SCRIPTS_DIR
of the plugin. Now the plugin's_GO_SCRIPTS_DIR
is correctly set to the/bin
parent directory of the command script. I'll add thorough tests for this in a future commit/PR.