-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set
REACT_NATIVE_NODE_MODULES_DIR
env var before fetching Reanimate…
…d pod
- Loading branch information
Showing
1 changed file
with
8 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
630b737
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fluiddot @dcalhoun thank you for implementing this, while I hadn't run in the issue myself, I can see who moving the value here might make the setup more robust.
I originally used the
pre_install
hook because it seemed more attuned to my interpretation of "the CocoaPods way™" , but if this works, I'm all in for it.This approach definitely ensures the env var is set before any operation related to that pod runs, which should guarantee it to be available to the pod in all scenarios.
630b737
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the documentation of the
pre_install
hook and says:My impression was that setting the env var in
pre_install
was the optimal approach, but seems some configuration in the Reanimated pod is happening before the installation process. That's why I went with the option for setting the env var directly before the pod is defined. However, if we find a better approach that guarantees thatREACT_NATIVE_NODE_MODULES_DIR
is set before processing the pod, I'm also in for it.630b737
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's the case, too, although I haven't dug into it. It wouldn't surprise me if there were additional steps CocoaPods makes in between downloading and installing.
👌