From 7a102dec96bda77baeb3ecb8b84d62b7a3efb180 Mon Sep 17 00:00:00 2001 From: anaxios Date: Wed, 7 Aug 2024 03:36:22 -0700 Subject: [PATCH] Refactor aicommit_groq script to remove unnecessary argument passing to pushd and popd --- aicommit_groq | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aicommit_groq b/aicommit_groq index 4bacba0..9b541b6 100755 --- a/aicommit_groq +++ b/aicommit_groq @@ -1,8 +1,9 @@ #!/bin/bash -pushd $(pwd) "$@" >/dev/null +pushd $(pwd) >/dev/null TMP_FILE="/tmp/aicommit" + if [[ -z "${GROQ_API_KEY}" ]]; then echo "API key not set." exit 1 @@ -39,4 +40,4 @@ fi git commit -e -m "$(cat ${TMP_FILE})" && rm ${TMP_FILE} -popd "$@" >/dev/null +popd >/dev/null