Skip to content

refactor(cli_plugins): hoist _emit_error onto SubcommandPlugin - #337

Open
speriaswamy-amd wants to merge 1 commit into
speriaswamy/cvsman-03-lazy-test-mapfrom
speriaswamy/cvsman-04-emit-error-base
Open

refactor(cli_plugins): hoist _emit_error onto SubcommandPlugin#337
speriaswamy-amd wants to merge 1 commit into
speriaswamy/cvsman-03-lazy-test-mapfrom
speriaswamy/cvsman-04-emit-error-base

Conversation

@speriaswamy-amd

Copy link
Copy Markdown
Contributor

Part 4 of 14 in a stack for AIMVT-276. Base: #336.

Why

_emit_error (print to stderr in --json mode so stdout stays valid JSON, else stdout) lived only on ExecPlugin. A second plugin needing identical behavior is coming later in this stack — better to share it than paste a second copy.

What changed

  • cvs/cli_plugins/base.py — added _emit_error to SubcommandPlugin.
  • cvs/cli_plugins/exec_plugin.py — removed its now-redundant copy.

exec_plugin.py had its own _emit_error (print to stderr in JSON mode so
stdout stays valid JSON, else stdout). A second plugin needing the same
behavior is coming next in this stack; move it onto the shared base rather
than paste a second copy.

AIMVT-276.
@speriaswamy-amd
speriaswamy-amd force-pushed the speriaswamy/cvsman-04-emit-error-base branch from 57b211f to bfa69f1 Compare August 14, 2026 20:33
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