digitalpulp / ballast

Ballast development environment for Drupal
GNU General Public License v2.0
18 stars 2 forks source link

Check for .git before setting up pre-commit #18

Closed testevez closed 6 years ago

testevez commented 6 years ago

I am getting this error when trying to set up my local Ballast environment (OSX 10.11.6).

 [Exec] Running pre-commit install in /Users/antonioestevez/DockerSites/your_project
An error has occurred: FatalError: git failed. Is it installed, and are you in a Git repository directory?
Check the log at /Users/antonioestevez/.cache/pre-commit/pre-commit.log
 [Exec]  Exit code 1  Time 0.427s

I made sure I had pre-commit installed, but it does not resolve the error.

$ which pre-commit
$ /Library/Frameworks/Python.framework/Versions/3.6/bin/pre-commit

I feel like I may be able to get it to run if I made changes to my config to avoid using this package, but I am not sure how to do that.

What can I change to make this environment run, thanks.

FatherShawn commented 6 years ago

Looking over the README.md I see that we expected the presence of a git repository. The nearest clue we gave was:

You should commit all files not excluded by the .gitignore file.

I'll look into adding a git init when create-project is used, but for now, in the root directory of your project a

git init
composer install

should do the trick. pre-commit is failing because there is nowhere for it to install git hooks.