From ac0f720a396211da86eb0f2ac977ab880f533707 Mon Sep 17 00:00:00 2001 From: Josh Rabinowitz Date: Tue, 9 Aug 2022 13:48:26 -0400 Subject: [PATCH] fix for #918, use OSX stat, not brew's gnu version(#920) --- src/_utils/_git_secret_tools_osx.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_utils/_git_secret_tools_osx.sh b/src/_utils/_git_secret_tools_osx.sh index 7fc33ce1..92f2151a 100644 --- a/src/_utils/_git_secret_tools_osx.sh +++ b/src/_utils/_git_secret_tools_osx.sh @@ -32,7 +32,8 @@ function __get_octal_perms_osx { local filename filename=$1 local perms - perms=$(stat -f "%04OLp" "$filename") + # we use /usr/bin/stat in case there's another stat available from brew. See #918 + perms=$(/usr/bin/stat -f "%04OLp" "$filename") # see _git_secret_tools_freebsd.sh for more about stat's format string echo "$perms" }