Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add manual Cocoapods installation info #2204

Merged

Conversation

okwasniewski
Copy link
Contributor

Summary:

This PR aims to:

  1. Add manual cocapods info when installation fails or user chooses "No" when prompted to install
  2. Fix CLI exiting the process when cocoapods installation goes wrong

CleanShot 2023-12-13 at 13 02 36@2x

Test Plan:

CI Green

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

packages/cli/src/commands/init/init.ts Outdated Show resolved Hide resolved
packages/cli/src/commands/init/init.ts Outdated Show resolved Hide resolved
__e2e__/init.test.ts Outdated Show resolved Hide resolved
__e2e__/init.test.ts Outdated Show resolved Hide resolved
__e2e__/init.test.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

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

Looks good to me.
I only left a couple of nits

@@ -196,6 +203,7 @@ async function createFromTemplate({
const installPodsValue = String(installCocoaPods);
Copy link
Contributor

Choose a reason for hiding this comment

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

you already have this variable in didInstallPods (line125)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed here: #2204 (comment)

didInstallPods is used for a slightly different purpose (also to check if the user didn't specify his choice) and mixing those two made the code more complex.

packages/cli/src/commands/init/printRunInstructions.ts Outdated Show resolved Hide resolved
@thymikee thymikee merged commit 1bf0d85 into react-native-community:main Dec 13, 2023
3 of 10 checks passed
thymikee pushed a commit that referenced this pull request Dec 13, 2023
* feat: add manual Cocoapods installation info

* feat: apply review comments

* fix: move logger.info out of nested if

* fix: hide banner in CI

* fix: check for Install cocoapods only on darwin

* test: check if cocoapods instruction is shown in another test

* Update packages/cli/src/commands/init/printRunInstructions.ts

Co-authored-by: Riccardo Cipolleschi <[email protected]>

---------

Co-authored-by: Riccardo Cipolleschi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants