mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
autolinked package scripts use absolute path (#46186)
Summary: A previous attempt at fixing this issue used a relative path (https://github.com/facebook/react-native/issues/45208), this doesn't work if the user runs bundle install outside of the `ios/` folder, using the `--project-directory=ios` argument. ## Changelog: [iOS][Fixed] support bundle install from outside the ios folder using --project-directory Pull Request resolved: https://github.com/facebook/react-native/pull/46186 Test Plan: Ran the command in a project with `react-native-firebase/app` using the `--project-directory`, confirmed that it's fixed when using the absolute path. closes: reactwg/react-native-releases#341 Reviewed By: cipolleschi Differential Revision: D61719821 Pulled By: blakef fbshipit-source-id: d83429dd29c9e8cc066ab9843ad95fdfc0af8dea
This commit is contained in:
committed by
Riccardo Cipolleschi
parent
2a567cb546
commit
39222b41cb
@@ -73,6 +73,7 @@ def list_native_modules!(config_command)
|
||||
found_pods.push({
|
||||
"configurations": configurations,
|
||||
"name": name,
|
||||
"root": package["root"],
|
||||
"path": relative_path.to_path,
|
||||
"podspec_path": podspec_path,
|
||||
"script_phases": script_phases
|
||||
@@ -168,7 +169,7 @@ def link_native_modules!(config)
|
||||
|
||||
# Support passing in a path relative to the root of the package
|
||||
if phase["path"]
|
||||
phase["script"] = File.read(File.expand_path(phase["path"], package[:path]))
|
||||
phase["script"] = File.read(File.expand_path(phase["path"], package[:root]))
|
||||
phase.delete("path")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user