Skip to content

Commit e38ed3a

Browse files
Stop using prebuilt rsync in installer when not on macOS (#3312)
Fixes running the installer on Linux, which we do on CI. Signed-off-by: Brentley Jones <github@brentleyjones.com>
1 parent 0703615 commit e38ed3a

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

xcodeproj/internal/templates/installer.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,24 @@ readonly dest_xcschemes="$dest/xcshareddata/xcschemes"
9090

9191
mkdir -p "$dest_xcschemes"
9292

93-
"$src_rsync" \
94-
--archive \
95-
--perms \
96-
--chmod=u+w,F-x \
97-
--delete \
98-
"$src_xcschemes" "$dest_xcschemes/"
99-
10093
if [[ $(uname) == "Darwin" ]]; then
10194
is_macos=1
95+
readonly rsync="$src_rsync"
10296
else
10397
is_macos=0
98+
readonly rsync="$(command -v rsync || true)"
99+
[[ -n "$rsync" ]] || fail \
100+
"Failed to locate host rsync." \
101+
"rules_xcodeproj's bundled rsync is only supported on macOS project generation."
104102
fi
105103

104+
"$rsync" \
105+
--archive \
106+
--perms \
107+
--chmod=u+w,F-x \
108+
--delete \
109+
"$src_xcschemes" "$dest_xcschemes/"
110+
106111
# Resolve the copy command (can't use `cp -c` if the files are on different
107112
# filesystems, or on Linux)
108113
if [[ $is_macos -eq 1 &&

0 commit comments

Comments
 (0)