fix: makes pre-commit action use sh instead of zsh

This commit is contained in:
Menno van Leeuwen 2024-08-27 20:37:21 +02:00
parent 7618ee2520
commit cc6cc59443
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -1,6 +1,4 @@
#!/usr/bin/env zsh
source $HOME/dotfiles/bin/helpers/functions.sh
#!/bin/sh
# Check for unencrypted files in .ssh/config.d/
unencrypted_files=$(find config/ssh/config.d/ -type f ! -name "*.gpg")
@ -17,8 +15,8 @@ if [ -n "$unencrypted_files" ]; then
# If any unencrypted files are staged, exit with a non-zero status
if [ -n "$unencrypted_staged_files" ]; then
echo ""
printfe "%s\n" "red" "Error: Unencrypted files are staged for commit!"
printfe "%s\n" "blue" "Use 'dotf secrets encrypt' to encrypt them before committing."
echo "Error: Unencrypted files are staged for commit!"
echo "Use 'dotf secrets encrypt' to encrypt them before committing."
exit 1
fi
fi