chennaji9 opened a new pull request, #5209: URL: https://github.com/apache/rocketmq-dashboard/pull/5209
### Which Issue(s) This PR Fixes None — small self-contained fix found by inspection (no issue tracked). ### Brief Description The text branch of `rmqctl version` ignored `fmt.Fprintf` errors and always returned `nil`, so with an unusable stdout the command still exited 0 — while the JSON and YAML branches do surface encoder write errors. Each line write is now checked and the error is wrapped (`write version output: …`), making all three output modes consistent. A `version_test.go` covers both paths with a failing writer plus a normal-output regression. Base is `rocketmq-studio` per CONTRIBUTING.md (the PR template's base comment is outdated). ### How Did You Test This Change? `cd rmqctl && go test -race -count=1 ./cmd/` → `ok github.com/apache/rocketmq-dashboard/rmqctl/cmd 1.878s` (includes the new `TestVersionCommand` subtests `versionTextOutputSucceedsTest` and `versionTextOutputFailureIsReportedTest`). `go vet ./...` → clean. `gofmt -l cmd/` → no output. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits (`fix:`) - [x] Tests added or updated for non-trivial changes (`rmqctl/cmd/version_test.go`) - [x] New UI text has both Chinese and English entries under `web/src/i18n/` (n/a — no UI change) - [x] Architecture constraints stay green (n/a — no Java change) - [x] New source files carry the ASF license header (`version_test.go` included) - [x] Documentation touched where behaviour changed (n/a — internal error handling) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
