Skip to content

Commit

Permalink
chore: fix pod install on linux
Browse files Browse the repository at this point in the history
treats xcode as not installed if not available
  • Loading branch information
user authored and legobeat committed Jul 28, 2024
1 parent 234738a commit fafa16f
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions patches/react-native+0.72.15.patch
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,43 @@ index 0000000..e69de29
diff --git a/node_modules/react-native/ReactCommon/react/renderer/components/rncore/States.h b/node_modules/react-native/ReactCommon/react/renderer/components/rncore/States.h
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native/scripts/cocoapods/utils.rb b/node_modules/react-native/scripts/cocoapods/utils.rb
index 6507f8b..9e0ec97 100644
--- a/node_modules/react-native/scripts/cocoapods/utils.rb
+++ b/node_modules/react-native/scripts/cocoapods/utils.rb
@@ -354,20 +354,22 @@ class ReactNativePodsUtils
end

def self.is_using_xcode15_0(xcodebuild_manager: Xcodebuild)
- xcodebuild_version = xcodebuild_manager.version
-
- # The output of xcodebuild -version is something like
- # Xcode 15.0
- # or
- # Xcode 14.3.1
- # We want to capture the version digits
- regex = /(\d+)\.(\d+)(?:\.(\d+))?/
- if match_data = xcodebuild_version.match(regex)
- major = match_data[1].to_i
- minor = match_data[2].to_i
- return major == 15 && minor == 0
+ begin
+ xcodebuild_version = xcodebuild_manager.version
+
+ # The output of xcodebuild -version is something like
+ # Xcode 15.0
+ # or
+ # Xcode 14.3.1
+ # We want to capture the version digits
+ regex = /(\d+)\.(\d+)(?:\.(\d+))?/
+ if match_data = xcodebuild_version.match(regex)
+ major = match_data[1].to_i
+ minor = match_data[2].to_i
+ return major == 15 && minor == 0
+ end
+ rescue => e
end
-
return false
end

0 comments on commit fafa16f

Please sign in to comment.