Summary
I set up a prek auto-update Github Action for my repo and use --check to determine if any updates occurred and then run without --check/--dry-run to actually make the change. This running twice seems kind of unnecessary. I'd like to run the update once and also return an exit code. I need the exit code to determine whether to run the create pull require step. I've also learned I can't just trust the stdout as it's changed over the past couple versions.
One possible solution is to add a --set-rc (not in love with that name) which works for both dry runs and non-dry runs. With such an addition the current --check usage would just be an alias for --dry-run --set-rc. This breaks no existing users and is minimally invasive.
Willing to submit a PR?
Platform
any
Version
0.3.10
.pre-commit-config.yaml
N/A
Log file
N/A
Summary
I set up a prek auto-update Github Action for my repo and use
--checkto determine if any updates occurred and then run without--check/--dry-runto actually make the change. This running twice seems kind of unnecessary. I'd like to run the update once and also return an exit code. I need the exit code to determine whether to run the create pull require step. I've also learned I can't just trust the stdout as it's changed over the past couple versions.One possible solution is to add a
--set-rc(not in love with that name) which works for both dry runs and non-dry runs. With such an addition the current--checkusage would just be an alias for--dry-run --set-rc. This breaks no existing users and is minimally invasive.Willing to submit a PR?
Platform
any
Version
0.3.10
.pre-commit-config.yaml
N/A
Log file
N/A