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

Suggested update to documentation/readme #1275

Closed
darcyparker opened this issue Jun 8, 2023 · 1 comment
Closed

Suggested update to documentation/readme #1275

darcyparker opened this issue Jun 8, 2023 · 1 comment

Comments

@darcyparker
Copy link

Please consider strengthening the recommended prepare script in the docs.

Sometimes the suggested "prepare": "husky install" script fails because it assumes the $CWD is a git repo. There are edge cases where it is not... (some builds on docker don't clone the whole git repo). And another edge case is that husky is a devDependency and only the dependency packages are installed...

I like "prepare": "husky install || exit 0" @Titan196 mentioned in #1213 (comment)

Another possible solution: "prepare": "git rev-parse &>/dev/null && husky install || echo 'Not git repo skipping husky install'" which makes it clear we're testing for the $CWD being a git repo... But perhaps not as good a solution if the user installed as husky as devDependency and didn't install the dev dependencies.

See #1271
See #1213

@typicode
Copy link
Owner

typicode commented Feb 2, 2024

v9 doesn't fail anymore, it will just give a warning 👍 thanks for the feedback

@typicode typicode closed this as completed Feb 2, 2024
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

No branches or pull requests

2 participants