Skip to content

Commit 637a942

Browse files
authored
Add homebrew paths to copy_outputs.sh rsync call (#3179)
This works around an issue in macOS 15.4 Signed-off-by: Luis Padron <lpadron@squareup.com>
1 parent 8fac6d1 commit 637a942

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

xcodeproj/internal/bazel_integration_files/copy_dsyms.sh

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

52+
# NOTE: use `which` to find the path to `rsync`.
53+
# In macOS 15.4, the system `rsync` is using `openrsync` which contains some permission issues.
54+
# This allows users to workaround the issue by overriding the system `rsync` with a working version.
55+
# Remove this once we no longer support macOS versions with broken `rsync`.
5256
# shellcheck disable=SC2046
53-
rsync \
57+
PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" \
58+
rsync \
5459
--copy-links \
5560
--recursive \
5661
--times \

xcodeproj/internal/bazel_integration_files/copy_outputs.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ if [[ "$ACTION" != indexbuild ]]; then
3131
ln -sfh "$PWD/$BAZEL_OUTPUTS_PRODUCT_BASENAME" "$TARGET_BUILD_DIR/$PRODUCT_NAME"
3232
else
3333
# Product is a bundle
34-
rsync \
34+
# NOTE: use `which` to find the path to `rsync`.
35+
# In macOS 15.4, the system `rsync` is using `openrsync` which contains some permission issues.
36+
# This allows users to workaround the issue by overriding the system `rsync` with a working version.
37+
# Remove this once we no longer support macOS versions with broken `rsync`.
38+
PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" \
39+
rsync \
3540
--copy-links \
3641
--recursive \
3742
--times \

xcodeproj/internal/templates/incremental_installer.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@ dest_dir="$(dirname "${dest}")"
7575
readonly dest_xcschemes="$dest/xcshareddata/xcschemes"
7676

7777
mkdir -p "$dest_xcschemes"
78-
rsync \
78+
79+
# NOTE: use `which` to find the path to `rsync`.
80+
# In macOS 15.4, the system `rsync` is using `openrsync` which contains some permission issues.
81+
# This allows users to workaround the issue by overriding the system `rsync` with a working version.
82+
# Remove this once we no longer support macOS versions with broken `rsync`.
83+
# shellcheck disable=SC2046
84+
PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" \
85+
rsync \
7986
--archive \
8087
--perms \
8188
--chmod=u+w,F-x \

xcodeproj/internal/templates/legacy_installer.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ fi
137137
# Sync over the project, changing the permissions to be writable
138138

139139
# Don't touch project.xcworkspace as that will make Xcode prompt
140-
rsync \
140+
# NOTE: use `which` to find the path to `rsync`.
141+
# In macOS 15.4, the system `rsync` is using `openrsync` which contains some permission issues.
142+
# This allows users to workaround the issue by overriding the system `rsync` with a working version.
143+
# Remove this once we no longer support macOS versions with broken `rsync`.
144+
# shellcheck disable=SC2046
145+
PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" \
146+
rsync \
141147
--archive \
142148
--copy-links \
143149
--perms \

0 commit comments

Comments
 (0)