Skip to content
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

v7 Installer is no longer gracefully failing in CI context #1000

Closed
cmdcarini opened this issue Jul 1, 2021 · 5 comments · Fixed by #1001
Closed

v7 Installer is no longer gracefully failing in CI context #1000

cmdcarini opened this issue Jul 1, 2021 · 5 comments · Fixed by #1001

Comments

@cmdcarini
Copy link
Contributor

Context
When running builds w/ Husky v7 in the CI, it seems that the Husky install is no longer failing gracefully, and is skipping over the git rev-parse command that usually halts the install process right away.

Instead the install is now failing on line 27 of the installer, that it can't find a .git directory.

@typicode
Copy link
Owner

typicode commented Jul 2, 2021

That would be a regression

@typicode
Copy link
Owner

typicode commented Jul 2, 2021

I did some tests.

It "works" like before except that the message is the one from git instead of a custom one.
But both in v6 or v7, the exit code is 0.

Instead of showing a custom "husky - not a Git repository, skipping hooks installation", I'm thinking that maybe showing Git error message is better. As you can find more info on the web with "fatal: not a git repository ..." rather than the husky one.

@typicode typicode closed this as completed Jul 2, 2021
@typicode
Copy link
Owner

typicode commented Jul 2, 2021

That said, in CI context you can disable prepare script if you want:
https://typicode.github.io/husky/#/?id=disable-husky-in-cidocker

@cmdcarini
Copy link
Contributor Author

Hmm, ok. I'll have to take another look and see what's actually wrong with our use. The Docker use-case seems to be exactly what I'm looking for, I'll give that a shot.

Thanks for the feedback and review!

@typicode
Copy link
Owner

typicode commented Jul 2, 2021

Thanks for the PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants