Skip to content
Commit cb2c44bb authored by Daniele Piccini's avatar Daniele Piccini
Browse files

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.
parent b38903ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment