gruntwork-io / pre-commit

A collection of pre-commit hooks used by Gruntwork tools
https://gruntwork.io/
Apache License 2.0
494 stars 157 forks source link

terraform hooks fail on windows with git bash #43

Closed parkalla86 closed 3 years ago

parkalla86 commented 3 years ago

We are currently integrating the pre-commit hooks into our projects. We are mainly setup on Windows systems. Using git bash, we found that "/bin/bash" could not be found. If we change the shebang to "#!/usr/bin/env bash" in the shell scripts (fmt, validate, lint), then we can use the scripts normally. Is it possible to adapt the terraform-based hooks with the more compatible shebang? You have already made the adjustment for shellcheck.sh.

Many Thanks Thorsten

yorinasub17 commented 3 years ago

This makes sense to me! That said, we're a bit buried with other initiatives so we most likely won't get to this anytime soon. A PR to make this switch would be very welcome.

parkalla86 commented 3 years ago

Good Morning from Germany! I did a PR: https://github.com/gruntwork-io/pre-commit/pull/44

Many thanks! Thorsten

yorinasub17 commented 3 years ago

Thanks for the PR! This was released in https://github.com/gruntwork-io/pre-commit/releases/tag/v0.1.11