fix for #918, use OSX stat, not brew's gnu version(#920)

This commit is contained in:
Josh Rabinowitz 2022-08-09 13:48:26 -04:00 committed by GitHub
parent 905a56cd26
commit ac0f720a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,8 @@ function __get_octal_perms_osx {
local filename local filename
filename=$1 filename=$1
local perms 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 # see _git_secret_tools_freebsd.sh for more about stat's format string
echo "$perms" echo "$perms"
} }