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

Fail the command if the command don't return a given return code #3

Open
sebt3 opened this issue Nov 15, 2024 · 0 comments
Open

Fail the command if the command don't return a given return code #3

sebt3 opened this issue Nov 15, 2024 · 0 comments

Comments

@sebt3
Copy link

sebt3 commented Nov 15, 2024

Is your feature request related to a problem? Please describe.
Using "cargo cmd" as a precommit hook always succed.
I would like to be able to use cargo commander as a fail-able script for git precommit hook.

Describe the solution you'd like
Add an option "continue_if_rc" that could be used as :

precommit = { cmd=[
"cargo clippy",
"cargo +nightly fmt --check"
], continue_if_rc=0}

if clippy fail then fmt is not run and cargo cmd return non-zero return-code. if fmt fail then cargo cmd return non-zero return-code.

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

No branches or pull requests

1 participant