Separate the installation of pre-commit to -f|--format case #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR separates the installation of
pre-commit
from the main installation viaorbit.sh -i|--install
into the already existing-f|--format
case.This means that end-users are no longer required to install
pre-commit
when using the includedorbit.sh -i|--install
option, which should simplify the Dockerfile layers (#17).With this PR,
pre-commit
is automatically installed withorbit.sh -f|--format
option if its command is not detected on the system. Furthermore, this PR makes sure thatpre-commit run
is always executed in the correct directory regardless of${PWD}
when callingorbit.sh -f|--format
. Contributors are already informed to run pre-commit via the PR checklist found in the template (as seen below).Type of change
Checklist
pre-commit
checks withpre-commit run --all-files
(see here instructions to set it up)config/extension.toml
file