Open TylerJang27 opened 4 weeks ago
We need this!
this is usually coded with --exit-code
that default to 1, if someone wants 0 they can use it
@ccoVeille could you clarify? Do you mean instead of --execute-non-zero
change this to --exit-code
(default to 0), which someone would override to --exit-code=1
?
I misunderstood what you implemented, I'm sorry. I will let you decide if there is still a need.
git, golangci-lint do like this. And many more.
https://github.com/search?q=language%3Amarkdown+%22--exit-code%22&type=code
I find the parameters more obvious than defining something by its opposite.
But your need is different
literally just hit this - was pretty sad when i realized I couldn't use freeze to "screenshot" error output.
Adds a
--execute-non-zero
flag that, when set, doesn't error when a--execute
commands has a nonzero exit code. This allows you to capture the output of commands that are expected to nonzero exit, such asmkdir .
, as a toy example.Please let me know if there's anything else you'd like me to change in this PR!
Fixes https://github.com/charmbracelet/freeze/issues/112