* feat: container runtime selection
use both docker and podman runtimes
1. if only docker on path use docker runtime
2. if only podman on path use podman runtime
3. to specify runtime use PREK_CONTAINER_RUNTIME
Signed-off-by: Steven Taylor <steven@taylormuff.co.uk>
* Tweak detection
---------
Signed-off-by: Steven Taylor <steven@taylormuff.co.uk>
Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
* Add Ruby support (no download support yet)
Currently only pre-existing Rubies are used, although the code will
search for and consider multiple versions. This allows a hook to require
3.4.7 when the default system Ruby is 3.4.6, but RVM (or a similar tool)
has installed 3.4.7. If a suitable Ruby cannot be found, the user is
prompted to install one manually and re-run.
Hooks get an isolated GEM_HOME, based on the hook repository, any
additional_dependencies, and the interpreter version/path. Any Ruby
upgrade would therefore re-install the gems to ensure that stale
versions aren't used. Repository gem dependencies are installed based on
the included gemspec files, combined with the additional_dependencies
field.
* Add pins for CI 'install Ruby' action
* Update setup-ruby pin
* Tweak version parsing
* Tweak env vars
---------
Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
* Add --fail-fast CLI flag to stop after first hook failure
- Add fail_fast field to RunArgs struct with CLI flag support
- Fix in hook_impl.rs where fail_fast was hardcoded to false
- Update run() and run_hooks() to accept and propagate fail_fast parameter
- CLI flag overrides config file setting (enables fail-fast mode)
- Ensure try-repo and main entry point pass fail_fast correctly
* Update test snapshots for --fail-fast flag
* Add CLI flag test for --fail-fast
* Fix trailing whitespace in test comment
* Publish prek to npmjs.com
* Add some docs
* Fix error in README
* Put installation after cargo in README
* Update docs
* Update integration
* Minor change
* Minor change
* Use `@j178/prek`
* Use cargo-dist generated npm package
---------
Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
* Show error message in quiet mode
In quiet mode (`-q`), error messages will still be printed.
In silent mode (`-qq`), nothing gets printed.
* Generate cli doc
* Add test
Checking the pre-commit documentation and the source code of prek will reveal that this is named language_version rather than language-version.
It's a tiny nit but a little confusing otherwise