trycmd icon indicating copy to clipboard operation
trycmd copied to clipboard

feat(trycmd): test only exit status with TRYCMD=status

Open bryango opened this issue 11 months ago • 3 comments

Closes #374 (my own issue).

This adds a new mode triggered by TRYCMD=status which only tests the exit status of commands, ignoring outputs. As proposed in #374, this would be useful when dealing with non-reproducible commands (where the output may change frequently). In that case, checking against the output is unrealistic, but it is still useful to validate that e.g. all the examples in README run successfully.

The implementation is mostly trivial and no public APIs are touched. I have taken the liberty of bumping the patch version number so that I can use this feature for myself more easily :laughing:

bryango avatar Jan 04 '25 12:01 bryango

Friendly ping @epage for comments & review :laughing:

bryango avatar Jan 10 '25 08:01 bryango

Keep in mind that this was posted during the holidays from which I am still catching up. You can get an idea of where I am at through my updates.

Also, per the contributor guide, we ask that problems and solutions get discussed before going on to PRs. I won't be looking at the implementation (PR) until the Issue we have an agreed to solution over there.

epage avatar Jan 10 '25 16:01 epage

I see. In my defense, I want the feature right now :laughing: and the implementation is easy so I just did it. Actually, I am already running a project on it.

But I do understand that the implementation deserves more discussion. Please take this PR as a proposal and if you feel that the design is not ideal, feel free to close it (it is a small patch, no loss haha).

Also, you don't need to respond right away, please take your time. Happy holidays!

bryango avatar Jan 10 '25 17:01 bryango