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
🐛 Fixes a small bug in the error catch behavoir #23
Conversation
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \ | ||
${INPUT_REVIEWDOG_FLAGS} || reviewdog_error="true" | ||
black_exit_val="${PIPESTATUS[0]}" | ||
black_check_output="$(black --diff --quiet --check ${INPUT_WORKDIR}/${black_args})" || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \ | ||
${INPUT_REVIEWDOG_FLAGS} || reviewdog_error="true" | ||
black_exit_val="${PIPESTATUS[0]}" | ||
black_check_output="$(black --diff --quiet --check ${INPUT_WORKDIR}/${black_args})" || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-filter-mode="diff_context" \ | ||
-level="${INPUT_LEVEL}" \ | ||
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \ | ||
${INPUT_REVIEWDOG_FLAGS} || reviewdog_exit_val="$?" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-level="${INPUT_LEVEL}" \ | ||
${INPUT_REVIEWDOG_FLAGS} || reviewdog_error="true" | ||
black_exit_val="${PIPESTATUS[0]}" | ||
black_check_output="$(black --check ${INPUT_WORKDIR}/${black_args} 2>&1)" || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-level="${INPUT_LEVEL}" \ | ||
${INPUT_REVIEWDOG_FLAGS} || reviewdog_error="true" | ||
black_exit_val="${PIPESTATUS[0]}" | ||
black_check_output="$(black --check ${INPUT_WORKDIR}/${black_args} 2>&1)" || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-filter-mode="${INPUT_FILTER_MODE}" \ | ||
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \ | ||
-level="${INPUT_LEVEL}" \ | ||
${INPUT_REVIEWDOG_FLAGS} || reviewdog_exit_val="$?" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏷️ [bumpr] Next version:v1.3.4 Changes:v1.3.3...reviewdog:fixes_error_catch_behavoir |
🚀 [bumpr] Bumped! New version:v1.3.4 Changes:v1.3.3...v1.3.4 |
🧪 Test results: Successful (see rickstaa/action-test-repo#22). |
This pull request changes the error catch behaviour. In the new version, I the black output is stored in a variable and the error is read directly after the command execution. This results in a more realibalbe error catch behavoir since when we use piping the exit code of the black formatter can be changed if reviewdog doesn't recognize a user defined flag (see this stack post).