Skip to content

Commit 41929ac

Browse files
Fix rsync permission issue for macOS 15.4 or higher (#3167)
Signed-off-by: Lucas Marçal <[email protected]>
1 parent f4a8115 commit 41929ac

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

xcodeproj/internal/bazel_integration_files/copy_dsyms.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ EOF
4949
if [[ -n "${BAZEL_OUTPUTS_DSYM:-}" ]]; then
5050
cd "${BAZEL_OUT%/*}"
5151

52-
if [[ $(sw_vers -productVersion | cut -d '.' -f 1-2) == "15.4" ]]; then
52+
if (( $(echo "$(sw_vers -productVersion | cut -d '.' -f 1-2)" | sed 's/\.//g') >= 154 )); then
5353
# 15.4's `rsync` has a bug that requires the src to have write permissions.
5454
# We normally shouldn't do this as it modifies the bazel output base, so we
55-
# limit this to only macOS 15.4.
55+
# limit this to only macOS 15.4 or higher.
5656
# shellcheck disable=SC2046
5757
chmod -R +w $(xargs -n1 <<< "$BAZEL_OUTPUTS_DSYM")
5858
fi

xcodeproj/internal/bazel_integration_files/copy_outputs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ if [[ "$ACTION" != indexbuild ]]; then
3030
# rpaths to work
3131
ln -sfh "$PWD/$BAZEL_OUTPUTS_PRODUCT_BASENAME" "$TARGET_BUILD_DIR/$PRODUCT_NAME"
3232
else
33-
if [[ $(sw_vers -productVersion | cut -d '.' -f 1-2) == "15.4" ]]; then
33+
if (( $(echo "$(sw_vers -productVersion | cut -d '.' -f 1-2)" | sed 's/\.//g') >= 154 )); then
3434
# 15.4's `rsync` has a bug that requires the src to have write
3535
# permissions. We normally shouldn't do this as it modifies the bazel
36-
# output base, so we limit this to only macOS 15.4.
36+
# output base, so we limit this to only macOS 15.4 or higher.
3737
chmod -R +w "$BAZEL_OUTPUTS_PRODUCT_BASENAME"
3838
fi
3939

xcodeproj/internal/templates/incremental_installer.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ dest_dir="$(dirname "${dest}")"
7474
# Copy over `xcschemes`
7575
readonly dest_xcschemes="$dest/xcshareddata/xcschemes"
7676

77-
if [[ $(sw_vers -productVersion | cut -d '.' -f 1-2) == "15.4" ]]; then
77+
if (( $(echo "$(sw_vers -productVersion | cut -d '.' -f 1-2)" | sed 's/\.//g') >= 154 )); then
7878
# 15.4's `rsync` has a bug that requires the src to have write permissions.
7979
# We normally shouldn't do this as it modifies the bazel output base, so we
80-
# limit this to only macOS 15.4.
80+
# limit this to only macOS 15.4 or higher.
8181
chmod -R +w "$src_xcschemes"
8282
fi
8383

xcodeproj/internal/templates/legacy_installer.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ fi
136136

137137
# Sync over the project, changing the permissions to be writable
138138

139-
if [[ $(sw_vers -productVersion | cut -d '.' -f 1-2) == "15.4" ]]; then
139+
if (( $(echo "$(sw_vers -productVersion | cut -d '.' -f 1-2)" | sed 's/\.//g') >= 154 )); then
140140
# 15.4's `rsync` has a bug that requires the src to have write permissions.
141141
# We normally shouldn't do this as it modifies the bazel output base, so we
142-
# limit this to only macOS 15.4.
142+
# limit this to only macOS 15.4 or higher.
143143
chmod -R +w "$src"
144144
fi
145145

0 commit comments

Comments
 (0)