diff --git a/packages/react-native/sdks/hermes-engine/hermes-utils.rb b/packages/react-native/sdks/hermes-engine/hermes-utils.rb index 67d57cf8fff..5356dc1f10f 100644 --- a/packages/react-native/sdks/hermes-engine/hermes-utils.rb +++ b/packages/react-native/sdks/hermes-engine/hermes-utils.rb @@ -126,7 +126,9 @@ def podspec_source_build_from_local_source_dir(react_native_path) source_dir_path = ENV['REACT_NATIVE_OVERRIDE_HERMES_DIR'] if Dir.exist?(source_dir_path) hermes_log("Using source code from local path: #{source_dir_path}") - tarball_path = File.join(artifacts_dir(), "hermes-engine-from-local-source-dir.tar.gz") + tarball_dir_path = artifacts_dir() + FileUtils.mkdir_p(tarball_dir_path) unless Dir.exist?(tarball_dir_path) + tarball_path = File.join(tarball_dir_path, "hermes-engine-from-local-source-dir.tar.gz") exclude_paths = [ "__tests__", "./external/flowtest",