-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaks if grunt isn't setup on every branch #21
Comments
@CamdenSegal Could you elaborate this with an additional PR for the current template? |
I guess I got your problem: You have some task running in your git hook/file that requires the Gruntfile. Please remove that. In case I misunderstood you, please simply add your file and explain what you are doing (in code). We can then reopen that issue. |
As it stands the hook files just try to run grunt with the tasks given at the time of running Let's say you have a three branches in your repo:
If you were to run If you were to run My proposed solution is to include a check for the existance of the Gruntfile.js before any hook tasks are run, then to run something like Does that make sense? Is there a better way to approach this issue? If you think that is a worthwhile change I can work on a PR. |
Yes, it perfectly makes sense.
👍 Thank you in advance! |
I've setup a pre-commit hook using grunt-githooks on a branch of my repository. If I switch to a branch that is not configured with a gruntfile it blocks me from committing with the error "Fatal error: Unable to find Gruntfile."
It seems like it could be a good practice change the hook script from binding into specific grunt tasks to instead:
This will allow for changing the tasks to be run per hook by just modifying the gruntfile, and also allow for different tasks, or no tasks, to be run on different branches.
The text was updated successfully, but these errors were encountered: