Skip to content

Fix parser plugin 'exec: no command' error#21

Merged
liamcervante merged 1 commit intomainfrom
liamcervante/fix-plugin-copy-bug
Mar 11, 2026
Merged

Fix parser plugin 'exec: no command' error#21
liamcervante merged 1 commit intomainfrom
liamcervante/fix-plugin-copy-bug

Conversation

@liamcervante
Copy link
Collaborator

Description

Fixes a bug where the parser plugin fails with exec: no command from hashicorp/go-plugin.

The Scanner struct was copying plugins.Config by value. The parser's Load closure (set during Process()) captured a pointer to the original parser.Config. When EnsureParser() ran on the scanner's copy, it set Plugin on the copy, but Load still read from the original where Plugin was still empty — resulting in exec.Command("").

The fix stores a *plugins.Config pointer in Scanner so that EnsureParser and Load operate on the same instance.

The Scanner struct was copying plugins.Config by value, but the
parser's Load closure captured a pointer to the original Config.
EnsureParser set the plugin path on the copy while Load read from
the original, resulting in "exec: no command" from go-plugin.
@liamcervante liamcervante requested a review from a team March 11, 2026 15:01
@liamcervante liamcervante merged commit ae4e5db into main Mar 11, 2026
4 checks passed
@liamcervante liamcervante deleted the liamcervante/fix-plugin-copy-bug branch March 11, 2026 15:06
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.

2 participants