-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
'husky install' fails if '.git' directory does not exists #1084
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
Comments
Hello! Does the custom directory section of documentation match your problem? |
I ran into this as well, and I was baffled to why this requires a custom directory config. This my case, and in BricePissard's case, the Looking for it should be (and can be!) fully automated. In the same way that any |
It's on purpose because of two issues that happened:
Also some users believe that I understand it can be annoying and there's no universal solution. However the choice was made with husky 7 to lean on the side of safety and being more explicit where hooks should be installed by not allowing That said as @mateuszklinowski mentioned, you can Hope it helps and clarifies the reasoning behind it :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@typicode wouldn't it be more convenient to have a flag for In my case it's even harder cause I'm integrating Husky as part of a project template, where the template cannot know where the |
@mateuszklinowski The link is not leading anywhere, could you update it? I believe this is the right one https://typicode.github.io/husky/guide.html#custom-directory |
If you have a large project, we can't install Husky anymore. Only small projects can install it now...
in a repo:
-- ./myRepo/back/package.json
-- ./myRepo/front/package.json
throw new Error(".git can't be found");
The bug still exists in 7.0.4, (#851) could you please place a recursive test to check if the .git folder exists in the parent, then parent's parent, then parent's parent's parent... folder.
In the real world, it happens that the GIT is a mono-repo that contains differents folders with different projects with a package.json in each.
The text was updated successfully, but these errors were encountered: