Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/ghostfolio/blame/commit/75dd43637c9da12d3daaf4dc9fede393b4da5a82/git-hooks/pre-commit You should set ROOT_URL correctly, otherwise the web may not work correctly.
ghostfolio/git-hooks/pre-commit

27 lines
610 B

#!/bin/bash
# Will check if "npm run format" is run before executing.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
echo "Running npm run format"
# Run the command and loop over its output
FILES_TO_STAGE=""
i=0
while IFS= read -r line; do
# Process each line here
((i++))
if [ $i -le 2 ]; then
continue
fi
if [[ $line == Done* ]]; then
break
fi
FILES_TO_STAGE="$FILES_TO_STAGE $line"
done < <(npm run format)
git add $FILES_TO_STAGE
echo "Files formatted. Committing..."