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