Skip to content

Conversation

@Saadnajmi
Copy link
Collaborator

Summary:

Followup from #2756 (comment)

require 'pathname'

modules_root = Pathname.new(__dir__).parent
modules_root = modules_root.parent until modules_root.join('node_modules').directory? || modules_root.root?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just going to find the first node_modules folder. react-native-macos and @react-native-community/cli-platform-ios might resolve to different ones.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It occurred to me that the template ships with RNM, not our init command, so we can just assume the legacy script is no longer there for 0.75+, and I don't need to check for both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants