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

Prepare script if project is outside .git root directory #1445

Open
1 task done
DannyTh1 opened this issue May 16, 2024 · 2 comments
Open
1 task done

Prepare script if project is outside .git root directory #1445

DannyTh1 opened this issue May 16, 2024 · 2 comments

Comments

@DannyTh1
Copy link

Troubleshoot

If you're migrating from husky 4, see:
https://typicode.github.io/husky/migrate-from-v4.html

Context

  • If the .git root directory is outside of project that init husky, what would the package.json script look like for "prepare"? The example provided in the docs only works if .git is in the same level. When running the instal.mjs script, it also errors saying husky() is not a function
@aabanaag
Copy link

aabanaag commented Jun 4, 2024

Any update on how to achieve this? I have the same setup and would like to be able to use the new version of husky

@aabanaag
Copy link

aabanaag commented Jun 6, 2024

I was able to fix this by doing prepare: cd .. && husky then on my end I'm using bun so my pre-commit should be cd src && bunx bun lint-staged

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