Skip to content

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

Open
nikoksr wants to merge 2 commits intoanthdm:masterfrom
nikoksr:refactor/cli-helpful-errors
Open

refactor(cli): always print errors when using the cli#3
nikoksr wants to merge 2 commits intoanthdm:masterfrom
nikoksr:refactor/cli-helpful-errors

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