aboutsummaryrefslogtreecommitdiff
path: root/toolchain_utils_githooks
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2019-03-08 15:16:06 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-10 13:11:45 -0700
commitb75a3e7bb0f91b246894af7cbb26cc8fef574800 (patch)
tree3e52661e81593f89e8740c4f4de7aff8bc46cb5f /toolchain_utils_githooks
parent00e11470777a421b0e996c3af925b8624dd8a824 (diff)
downloadtoolchain-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-xtoolchain_utils_githooks/check-style5
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")")"