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

Please show error messages if makeCmdTasks fails #1309

Open
kqhasaki opened this issue Aug 3, 2023 · 0 comments
Open

Please show error messages if makeCmdTasks fails #1309

kqhasaki opened this issue Aug 3, 2023 · 0 comments

Comments

@kqhasaki
Copy link

kqhasaki commented Aug 3, 2023

Today I cannot use husky, it keeps showing husky - pre-commit hook exited with code 1 (error). I use lint-staged for pre-commit checking. Suddenly yarn lint-staged failed in slience with no error message displayed in terminal. After spending a lot of time, I found that someone updated .eslintrc.yml and add a new plugin, then yarn install solved the problem.

However, when the task eslint failed with some reason, it's error should be handled in lint-staged and error message should not be masked. I checked the code of runAll() function, here in generateTasks, all the makeCmdTasks call doesn't catch error. It seems makeCmdTasks do fail at some time, please show the error messages in some way. Thank you!
https://github.com/okonet/lint-staged/blob/5cead2d4c1fc79171f41dd269402a8ee46d442cc/lib/runAll.js#L178-L226

@kqhasaki kqhasaki changed the title please show error messages if makeCmdTasks fails Please show error messages if makeCmdTasks fails Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant