Skip to content
Snippets Groups Projects
Commit 8e5f3aa8 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'pre-commit' into 'master'

[bdt dev checkout] install pre-commit hook if config is available

See merge request !289
parents a3985227 d028ba1d
No related branches found
No related tags found
1 merge request!289[bdt dev checkout] install pre-commit hook if config is available
Pipeline #60858 passed
...@@ -62,6 +62,13 @@ def checkout(ctx, names, use_https, subfolder): ...@@ -62,6 +62,13 @@ def checkout(ctx, names, use_https, subfolder):
subprocess.check_call(["git", "clone", url, dest]) subprocess.check_call(["git", "clone", url, dest])
# call pre-commit if its configuration exists
if os.path.isfile(os.path.join(dest, ".pre-commit-config.yaml")):
click.echo(
"Installing pre-commit hooks. Make sure you have pre-commit installed."
)
subprocess.check_call(["pre-commit", "install"], cwd=dest)
@with_plugins(iter_entry_points("bdt.dev.cli")) @with_plugins(iter_entry_points("bdt.dev.cli"))
@click.group( @click.group(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment