diff options
author | George Burgess IV <gbiv@google.com> | 2019-03-08 15:16:06 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-10 13:11:45 -0700 |
commit | b75a3e7bb0f91b246894af7cbb26cc8fef574800 (patch) | |
tree | 3e52661e81593f89e8740c4f4de7aff8bc46cb5f /toolchain_utils_githooks | |
parent | 00e11470777a421b0e996c3af925b8624dd8a824 (diff) | |
download | toolchain-utils-b75a3e7bb0f91b246894af7cbb26cc8fef574800.tar.gz |
[githooks] Fix the check-style hook
If all we're doing is deleting a file, this hook will fail loudly.
That's not what we want with ${PRESUBMIT_FILES}, since that's empty if
all we're doing is deleting files.
BUG=None
TEST=repo upload
Change-Id: I0a2e88c635f614ada113e2c29dd9509714680135
Reviewed-on: https://chromium-review.googlesource.com/1512954
Commit-Ready: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Caroline Tice <cmtice@chromium.org>
Diffstat (limited to 'toolchain_utils_githooks')
-rwxr-xr-x | toolchain_utils_githooks/check-style | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/toolchain_utils_githooks/check-style b/toolchain_utils_githooks/check-style index 7178ad49..0ce11877 100755 --- a/toolchain_utils_githooks/check-style +++ b/toolchain_utils_githooks/check-style @@ -7,9 +7,8 @@ # interleaving output/etc. if [[ $# -eq 0 ]]; then - echo "No files were given to check the format of." >&2 - echo "Usage: $0 file1 file2 ..." >&2 - exit 1 + echo "No files were given to check the style of. Exiting." >&2 + exit fi mydir="$(dirname "$(readlink -m "$0")")" |