Repository navigation
fix: stop busser plugin list printing git errors and a phantom plugin - #77
Merged
Merged
Conversation
Running the command against a normal install produced this: ```text $ busser plugin list fatal: not a git repository (or any of the parent directories): .git Plugin Version dummy 0.9.1 bash 0.1.4 ``` Two separate problems, both user visible on a command people reach for when something is not working. **The git error.** `gem_from_path` preferred loading a gemspec *file* over asking RubyGems. Loading a gemspec evaluates it, and these gemspecs shell out to `git ls-files` to build their file list -- so every installed plugin printed a git failure from a directory that is not a checkout. It now asks `Gem::Specification.find_by_path` first, which answers from the installed specs without running anything, and only falls back to a working-tree gemspec when that comes back empty, which is the local-development case the fallback was for. The fallback also now checks the gemspec exists before loading it. **The phantom plugin.** `dummy` is a fixture shipped inside busser for its own tests, not something anyone installed. `busser test` already passes over it, so listing it as installed was inconsistent as well as confusing. After: ```text $ busser plugin list Plugin Version bash 0.2.0 ``` `busser test dummy` and `busser plugin install dummy` still work -- those name the runner explicitly and do not go through the listing. Signed-off-by: Tim Smith <tsmith84@proton.me>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fix: stop
busser plugin listprinting git errors and a phantom pluginRunning the command against a normal install produced this:
Two separate problems, both user visible on a command people reach for when
something is not working.
The git error.
gem_from_pathpreferred loading a gemspec file overasking RubyGems. Loading a gemspec evaluates it, and these gemspecs shell out to
git ls-filesto build their file list -- so every installed plugin printed agit failure from a directory that is not a checkout. It now asks
Gem::Specification.find_by_pathfirst, which answers from the installed specswithout running anything, and only falls back to a working-tree gemspec when
that comes back empty, which is the local-development case the fallback was for.
The fallback also now checks the gemspec exists before loading it.
The phantom plugin.
dummyis a fixture shipped inside busser for its owntests, not something anyone installed.
busser testalready passes over it, solisting it as installed was inconsistent as well as confusing.
After:
busser test dummyandbusser plugin install dummystill work -- those namethe runner explicitly and do not go through the listing.