You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using lint-staged in my GitHub Actions and want to detect whether lint-staged has failed because of the failure of internal git diff or because of linters.
For example, git diff always throws an error if it is the first commit. (I can use the /dev/null hash to avoid it, but it is complicated and cannot handle other errors.)
I suggest using another exit code for internal errors, including git diff, like prettier.
I checked through the current behavior of lint-staged, and it always exits with 1, as defined here.
Description
I'm using lint-staged in my GitHub Actions and want to detect whether lint-staged has failed because of the failure of internal
git diff
or because of linters.For example,
git diff
always throws an error if it is the first commit. (I can use the/dev/null
hash to avoid it, but it is complicated and cannot handle other errors.)I suggest using another exit code for internal errors, including
git diff
, like prettier.I checked through the current behavior of lint-staged, and it always exits with 1, as defined here.
lint-staged/bin/lint-staged.js
Lines 124 to 129 in 26eee9d
The text was updated successfully, but these errors were encountered: