Refactor aicommit_groq script to remove unnecessary argument passing to pushd and popd

This commit is contained in:
ilguappo 2024-08-07 03:36:22 -07:00
parent 78b72c3e36
commit 7a102dec96

View File

@ -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