Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cli): always print errors when using the cli #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nikoksr
Copy link
Contributor

@nikoksr nikoksr commented Dec 13, 2023

Summary

Prior to this change, slick run did not print any errors that were caused by the underlying run implementation, which required the user to use go run manually to find out what's wrong.

This change fixes that, and also pipes the stderr of all commands into the OS' stderr which should help with debugging things.

To achieve that, I abstracted the command logic and added the commandOptions type. I chose an options type over passing a verbose parameter directly, to keep things more flexible down the line.

Prior to this change, `slick run` did not print any errors that were
caused by the underlying run implementation, which required the user to
use `go run` manually to find out what's wrong.

This change fixes that, and also pipes the stderr of all commands into
the OS' stderr which should help with debugging things.

To achieve that, I abstracted the command logic and added the
`commandOptions` type. I chose an options type over passing a `verbose`
parameter directly, this keeps things more flexible and maintainable
down the line.
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