File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 3939import pathlib
4040import platform
4141import plistlib
42+ import shutil
4243import subprocess
4344import sys
4445import tempfile
@@ -300,8 +301,15 @@ def extracted_app(
300301 # fail with `Unhandled error domain NSPOSIXErrorDomain, code 13`.
301302 dst_dir = os .path .join (tempfile .gettempdir (), "bazel_temp_" + app_name )
302303 os .makedirs (dst_dir , exist_ok = True )
304+
305+ # NOTE: use `which` to find the path to `rsync`.
306+ # In macOS 15.4, the system `rsync` is using `openrsync` which contains some permission issues.
307+ # This allows users to workaround the issue by overriding the system `rsync` with a working version.
308+ # Remove this once we no longer support macOS versions with broken `rsync`.
309+ rsync_path = shutil .which ("rsync" )
310+
303311 rsync_command = [
304- "/usr/bin/rsync" ,
312+ rsync_path ,
305313 "--archive" ,
306314 "--delete" ,
307315 "--checksum" ,
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ def is_apple_tv(self) -> bool:
132132
133133 def is_apple_watch (self ) -> bool :
134134 return self .has_product_family_or_identifier ("Apple Watch" )
135-
135+
136136 def is_apple_vision (self ) -> bool :
137137 return self .has_product_family_or_identifier ("Apple Vision" )
138138
@@ -537,8 +537,15 @@ def extracted_app(
537537 # fail with `Unhandled error domain NSPOSIXErrorDomain, code 13`.
538538 dst_dir = os .path .join (tempfile .gettempdir (), "bazel_temp_" + app_name )
539539 os .makedirs (dst_dir , exist_ok = True )
540+
541+ # NOTE: use `which` to find the path to `rsync`.
542+ # In macOS 15.4, the system `rsync` is using `openrsync` which contains some permission issues.
543+ # This allows users to workaround the issue by overriding the system `rsync` with a working version.
544+ # Remove this once we no longer support macOS versions with broken `rsync`.
545+ rsync_path = shutil .which ("rsync" )
546+
540547 rsync_command = [
541- "/usr/bin/rsync" ,
548+ rsync_path ,
542549 "--archive" ,
543550 "--delete" ,
544551 "--checksum" ,
You can’t perform that action at this time.
0 commit comments