fix: condition for PRE_COMMIT_FILE null check
The condition in the pre_commit_setup function was incorrectly checking
for a non-empty PRE_COMMIT_FILE, while the error message suggested it
should fail on a null value. This commit changes the condition to
correctly check for an empty or unset PRE_COMMIT_FILE.
- Changed [[ -n "${PRE_COMMIT_FILE}" ]] to [[ -z "${PRE_COMMIT_FILE}" ]]
- This ensures the function fails when PRE_COMMIT_FILE is empty or unset,
aligning with the error message
This fix improves the reliability of the pre-commit setup process by
properly validating the PRE_COMMIT_FILE variable.
Loading