Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@wagoodman
Copy link
Contributor

Today we print errors to stderr manually, however, we should be using the logger for this when it is available.

@wagoodman wagoodman added the enhancement New feature or request label Nov 7, 2024
kzantow
kzantow previously approved these changes Nov 7, 2024
Signed-off-by: Alex Goodman <[email protected]>
@wagoodman wagoodman force-pushed the log-errors-over-print branch from 863ffc4 to 8dc4a8f Compare November 7, 2024 22:37
@wagoodman wagoodman marked this pull request as draft November 7, 2024 22:43
@wagoodman

This comment was marked as outdated.

@wagoodman wagoodman dismissed kzantow’s stale review November 7, 2024 22:44

need a fundemental change here

@wagoodman wagoodman marked this pull request as ready for review November 8, 2024 16:52
@wagoodman wagoodman enabled auto-merge (squash) November 8, 2024 17:26
Copy link
Contributor

@kzantow kzantow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something about this doesn't sit especially well with me, but I believe it should fix the issue. I wonder if we could adjust where the init happens, maybe through some PersistentPreRun kind of function, but it would require more research whether this continues to run prior to cobra errors on child commands/other edge cases/etc..

@wagoodman wagoodman merged commit 799401f into main Nov 8, 2024
4 checks passed
@wagoodman wagoodman deleted the log-errors-over-print branch November 8, 2024 17:38
@wagoodman
Copy link
Contributor Author

wagoodman commented Nov 8, 2024

I agree there may be a more elegant solution, but for now (functional > elegance) == true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants