Skip to content

Commit

Permalink
Abort pod install if bad HERMES_ENGINE_TARBALL_PATH is set
Browse files Browse the repository at this point in the history
Summary:
Changelog:
[iOS][Changed] - Abort pod install if bad HERMES_ENGINE_TARBALL_PATH is set.

Reviewed By: cipolleschi

Differential Revision: D41341471

fbshipit-source-id: 34a3ac154b0a3f795d07dcd10f92361cb9bb4ad6
  • Loading branch information
dmytrorykun authored and facebook-github-bot committed Nov 21, 2022
1 parent 81e441a commit 27e7295
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sdks/hermes-engine/hermes-engine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ isInMain = version.include?('1000.0.0')
isNightly = version.start_with?('0.0.0-')

if ENV.has_key?('HERMES_ENGINE_TARBALL_PATH')
Pod::UI.puts '[Hermes] Using pre-built Hermes binaries from local path.' if Object.const_defined?("Pod::UI")
if !File.exist?(ENV['HERMES_ENGINE_TARBALL_PATH'])
abort "[Hermes] HERMES_ENGINE_TARBALL_PATH is set, but points to a non-existing file: \"#{ENV['HERMES_ENGINE_TARBALL_PATH']}\"\nIf you don't want to use tarball, run `unset HERMES_ENGINE_TARBALL_PATH`"
end
end

if ENV.has_key?('HERMES_ENGINE_TARBALL_PATH')
Pod::UI.puts "[Hermes] Using pre-built Hermes binaries from local path: #{ENV['HERMES_ENGINE_TARBALL_PATH']}".yellow if Object.const_defined?("Pod::UI")
source[:http] = "file://#{ENV['HERMES_ENGINE_TARBALL_PATH']}"
elsif isInMain
Pod::UI.puts '[Hermes] Installing hermes-engine may take slightly longer, building Hermes compiler from source...'.yellow if Object.const_defined?("Pod::UI")
Expand Down

0 comments on commit 27e7295

Please sign in to comment.