From 8a128ba81ebf8674fb89e773dce70da00bf00716 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 23 May 2023 11:51:36 -0700 Subject: [PATCH] =?UTF-8?q?commit-msg:=20Don=E2=80=99t=20change=20the=20cu?= =?UTF-8?q?rrent=20directory=20for=20non-Vagrant.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders Kaseorg --- tools/commit-msg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/commit-msg b/tools/commit-msg index 118d33b107..6efea1f667 100755 --- a/tools/commit-msg +++ b/tools/commit-msg @@ -7,12 +7,11 @@ # Do not invoke gitlint if commit message is empty if grep -q '^[^#]' "$1"; then - lint_cmd="cd ~/zulip && gitlint" if if [ -z "$VIRTUAL_ENV" ] && command -v vagrant >/dev/null && [ -e .vagrant ]; then - ! vagrant ssh -c "$lint_cmd" + ! vagrant ssh -c 'cd ~/zulip && gitlint' else - ! eval "$lint_cmd" + ! gitlint fi <"$1" then echo "WARNING: Your commit message does not match Zulip's style guide."