Skip to content

Commit d4bd058

Browse files
committed
fix function
1 parent 8824a18 commit d4bd058

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/common/helpers.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ do_strip () {
120120
local file_pattern="$2"
121121

122122
if [[ $HOST_OS == "macos" ]]; then
123-
find ${target_dir} -type f -name "${file_pattern}" -executable -exec strip -S {} \;
123+
# BSD find doesn't support -executable, use -perm instead
124+
# -perm +111 matches files with execute permission for user, group, or other
125+
/usr/bin/find ${target_dir} -type f -name "${file_pattern}" -perm +111 -exec strip -S {} \;
124126
else
125127
find ${target_dir} -type f -name "${file_pattern}" -executable -exec strip --strip-debug {} \;
126128
fi

0 commit comments

Comments
 (0)