cli/internal/cmd
Snider 74256fb708
Standardize CLI Error Handling (#318)
* Standardize CLI error handling and deprecate cli.Fatal

- Updated `pkg/cli/output.go` to send error and warning output to `os.Stderr`.
- Added `ErrorWrap`, `ErrorWrapVerb`, and `ErrorWrapAction` helpers to `pkg/cli/output.go`.
- Deprecated `cli.Fatal` family of functions in `pkg/cli/errors.go`.
- Introduced `cli.ExitError` and `cli.Exit` helper to allow commands to return specific exit codes.
- Updated `pkg/cli/app.go` to silence Cobra errors and handle error printing and process exit in `Main`.
- Refactored multiple commands (QA, SDK, CI, Updater) to return errors instead of exiting abruptly.
- Replaced direct `os.Stderr` writes with standardized CLI or log helpers across the codebase.
- Updated tests to accommodate changes in output destination.

* Fix CI failure: remove unused fmt import in pkg/mcp/transport_tcp.go

- Removed unused "fmt" import in `pkg/mcp/transport_tcp.go` that was causing CI failure.
- Verified build and relevant tests pass.

* Standardize CLI error handling and fix formatting issues

- Updated `pkg/cli/output.go` to send error and warning output to `os.Stderr`.
- Added `ErrorWrap`, `ErrorWrapVerb`, and `ErrorWrapAction` helpers to `pkg/cli/output.go`.
- Deprecated `cli.Fatal` family of functions in `pkg/cli/errors.go`.
- Introduced `cli.ExitError` and `cli.Exit` helper to allow commands to return specific exit codes.
- Updated `pkg/cli/app.go` to silence Cobra errors and handle error printing and process exit in `Main`.
- Refactored multiple commands (QA, SDK, CI, Updater) to return errors instead of exiting abruptly.
- Replaced direct `os.Stderr` writes with standardized CLI or log helpers across the codebase.
- Updated tests to accommodate changes in output destination.
- Fixed formatting in `pkg/io/local/client.go`.
- Removed unused `fmt` import in `pkg/mcp/transport_tcp.go`.

* Standardize CLI error handling and fix CI issues

- Updated `pkg/cli/output.go` to send error and warning output to `os.Stderr`.
- Added `ErrorWrap`, `ErrorWrapVerb`, and `ErrorWrapAction` helpers to `pkg/cli/output.go`.
- Deprecated `cli.Fatal` family of functions in `pkg/cli/errors.go`.
- Introduced `cli.ExitError` and `cli.Exit` helper to allow commands to return specific exit codes.
- Updated `pkg/cli/app.go` to silence Cobra errors and handle error printing and process exit in `Main`.
- Refactored multiple commands (QA, SDK, CI, Updater) to return errors instead of exiting abruptly.
- Replaced direct `os.Stderr` writes with standardized CLI or log helpers across the codebase.
- Updated tests to accommodate changes in output destination.
- Fixed formatting in `pkg/io/local/client.go`.
- Removed unused `fmt` import in `pkg/mcp/transport_tcp.go`.
- Fixed potential `gh` context issue in `.github/workflows/auto-merge.yml` by providing `GH_REPO`.

---------

Co-authored-by: Claude <developers@lethean.io>
2026-02-05 06:55:49 +00:00
..
ai feat: wire release command, add tar.xz support, unified installers (#277) 2026-02-04 00:49:57 +00:00
ci Migrate pkg/release to io.Medium abstraction (#290) 2026-02-04 15:07:13 +00:00
collect feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
config feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
crypt feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
deploy feat: wire release command, add tar.xz support, unified installers (#277) 2026-02-04 00:49:57 +00:00
dev Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
docs Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
doctor Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
gitcmd feat(mcp): add workspace root validation to prevent path traversal (#100) 2026-02-01 21:59:34 +00:00
gitea feat(gitea): add Gitea Go SDK integration and CLI commands (#324) 2026-02-04 21:12:12 +00:00
go Standardize CLI Error Handling (#318) 2026-02-05 06:55:49 +00:00
help feat: Batch implementation of Gemini issues (#176) 2026-02-02 04:20:18 +00:00
monitor Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
php Standardize CLI Error Handling (#318) 2026-02-05 06:55:49 +00:00
pkgcmd Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
plugin feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
qa Standardize CLI Error Handling (#318) 2026-02-05 06:55:49 +00:00
rag feat: infrastructure packages and lint cleanup (#281) 2026-02-04 11:34:43 +00:00
sdk Standardize CLI Error Handling (#318) 2026-02-05 06:55:49 +00:00
security Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
setup Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
test feat(mcp): add workspace root validation to prevent path traversal (#100) 2026-02-01 21:59:34 +00:00
unifi feat(release): add Homebrew tap support and fix artifact naming (#325) 2026-02-05 01:37:02 +00:00
updater Standardize CLI Error Handling (#318) 2026-02-05 06:55:49 +00:00
vm Sanitize user input in execInContainer to prevent injection (#305) 2026-02-05 03:43:12 +00:00
workspace feat: Batch implementation of Gemini issues (#176) 2026-02-02 04:20:18 +00:00