uranusjr commented on a change in pull request #19155:
URL: https://github.com/apache/airflow/pull/19155#discussion_r740770494
##########
File path: clients/gen/common.sh
##########
@@ -71,6 +71,8 @@ function run_pre_commit {
# prepend license headers
pre-commit run --all-files || true
+ echo "Output above will state Failed: 'Some sources were modified by the
hook' - This is expected as the hook is used to add the licences."
+ pre-commit run --all-files
Review comment:
Since this function is only called from scripts without `set -e`, trap
is not needed. But instead of `|| true` we should check `$?` and only show the
message on failures.
##########
File path: clients/gen/common.sh
##########
@@ -71,6 +71,8 @@ function run_pre_commit {
# prepend license headers
pre-commit run --all-files || true
+ echo "Output above will state Failed: 'Some sources were modified by the
hook' - This is expected as the hook is used to add the licences."
+ pre-commit run --all-files
Review comment:
Since this function is only called from scripts without `set -e`, trap
is not needed. But instead of `|| true` we should check `$?` and only show the
message on failures.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]