From cc6cc59443c5c01b32987e0606f87f208c7056f7 Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Tue, 27 Aug 2024 20:37:21 +0200 Subject: [PATCH] fix: makes pre-commit action use sh instead of zsh --- bin/actions/git/pre-commit | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/actions/git/pre-commit b/bin/actions/git/pre-commit index 6a8037f..dead663 100755 --- a/bin/actions/git/pre-commit +++ b/bin/actions/git/pre-commit @@ -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