Skip to content

Commit ee88357

Browse files
committed
feat: Don't run gazelle if no prefix
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
1 parent 40b81cf commit ee88357

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

hooks/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ bazel_check() {
108108
COMMON_PREFIX="${PREFIX}"
109109
done
110110

111-
if [[ -n ${COMMON_PREFIX:-} ]]; then
112-
var_info "Checking Bazel Gazelle for ${COMMON_PREFIX}"
111+
if [[ ${COMMON_PREFIX:-.} != "." ]]; then
112+
var_info "Checking Bazel Gazelle for ${COMMON_PREFIX}/"
113113
run_command bzl run --ui_event_filters=-info,-stdout,-stderr --show_progress=false --color=no //:gazelle -- fix "${COMMON_PREFIX}/"
114114
fi
115115
}

0 commit comments

Comments
 (0)