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

Unable to make a commit unless doctoc is installed in global scope #112

Closed
igordanchenko opened this issue Dec 16, 2021 · 0 comments · Fixed by #113
Closed

Unable to make a commit unless doctoc is installed in global scope #112

igordanchenko opened this issue Dec 16, 2021 · 0 comments · Fixed by #113

Comments

@igordanchenko
Copy link

Current Behavior

Local commits fail unless doctoc is installed in global scope.

.husky/pre-commit: line 7: doctoc: command not found
husky - pre-commit hook exited with code 127 (error)

This is happening due to pre-commit hook:

yarn pretty-quick --staged --pattern '!test/tests/lint/**'
yarn lint
yarn deduplicate:check
doctoc README.md       <----- this line is breaking commit

Expected behavior

I should be able to commit changes without installing doctoc globally.

Suggested solution(s)

  • create doctoc script in package.json
  • invoke it via yarn doctoc in husky pre-commit hook
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.

1 participant