Skip to content

fix: stop busser plugin list printing git errors and a phantom plugin - #77

Merged
tas50 merged 1 commit into
mainfrom
fix-plugin-list
Aug 28, 2026
Merged

tas50 merged 1 commit into
mainfrom
fix-plugin-list

Conversation

@tas50

@tas50 tas50 commented Aug 28, 2026

Copy link
Copy Markdown
Member

fix: stop busser plugin list printing git errors and a phantom plugin

Running the command against a normal install produced this:

$ 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:

$ 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.

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>
@tas50
tas50 merged commit 7a99ebd into main Aug 28, 2026
8 checks passed
@tas50
tas50 deleted the fix-plugin-list branch August 28, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant