Skip to content

Commit

Permalink
build: remove deprecated File.exists() method from Hermes podspec. (#…
Browse files Browse the repository at this point in the history
…35853)

Summary:
Remove deprecated `File.exists` method which was removed in later Ruby versions. Spotted during a brew upgrade [here](software-mansion/react-native-reanimated#3919).

https://rubyapi.org/2.5/o/file#method-c-exist-3F

```
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`
[!] Failed to load 'hermes-engine' podspec:
[!] Invalid `hermes-engine.podspec` file: undefined method `exists?' for File:Class.
 #  from [..]/node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec:46
 ```

## Changelog

[IOS] [FIXED] - Migrated `File.exists` from Hermes podspec for non-deprecated `File.exist`.

Pull Request resolved: #35853

Test Plan: Valid CI via CircleCI.

Reviewed By: dmytrorykun

Differential Revision: D42543148

Pulled By: cipolleschi

fbshipit-source-id: 5ed30d8cc3e4c91a6e86d51f7d44a125bf85f7e8
  • Loading branch information
iBotPeaches authored and facebook-github-bot committed Jan 17, 2023
1 parent e6d1ab9 commit 732a02a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdks/hermes-engine/hermes-utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def compute_hermes_source(build_from_source, hermestag_file, git, version, build
if ENV.has_key?('HERMES_ENGINE_TARBALL_PATH')
use_tarball(source)
elsif build_from_source
if File.exists?(hermestag_file)
if File.exist?(hermestag_file)
build_from_tagfile(source, git, hermestag_file)
else
build_hermes_from_source(source, git)
Expand Down

0 comments on commit 732a02a

Please sign in to comment.