Fix regression stopping `--project-directory` from working (#55204)
Summary:
This is a fix for a regression in https://github.com/facebook/react-native/issues/54948 found by Kudo. Passing an absolute path for `react_native_path` was non-functional before and the change was meant to fix this.
This however used `Pathname.pwd.join(path)` since I assumed that'd be the intention for a relative path. However, my assumption was that `pod install` would only ever be run in the installation root and hence be equivalent to `Pod::Config.instance.installation_root` most of the time.
This broke: `pod install --project-directory ios` (and the likes), since I wasn't aware of the `--project-directory` argument before.
To fix this, we should construct the absolute path and join from `Pod::Config.instance.installation_root` as well.
**Note to self:** Needs a pick into `0.84.0` due to being a regression (will file a pick request after this is merged)
## Changelog:
[IOS] [FIXED] Regression from https://github.com/facebook/react-native/issues/54948 preventing `pod install --project-directory` from working properly
Pull Request resolved: https://github.com/facebook/react-native/pull/55204
Test Plan: - Run `pod install` in `rn-tester` to validate
Reviewed By: vzaidman
Differential Revision: D90870064
Pulled By: cipolleschi
fbshipit-source-id: 4a7bc0320afda29373791f206b31e57ae48b0b8c