cli
cli copied to clipboard
fix: Correctly display errors in react-native init
Summary:
The problem I noticed was that when I specified the wrong template, the error wording was funny.
$ react-native init TestProduct --template typescript
###### ######
### #### #### ###
## ### ### ##
## #### ##
## #### ##
## ## ## ##
## ### ### ##
## ######################## ##
###### ### ### ######
### ## ## ## ## ###
### ## ### #### ### ## ###
## #### ######## #### ##
## ### ########## ### ##
## #### ######## #### ##
### ## ### #### ### ## ###
### ## ## ## ## ###
###### ### ### ######
## ######################## ##
## ### ### ##
## ## ## ##
## #### ##
## #### ##
## ### ### ##
### #### #### ###
###### ######
Welcome to React Native!
Learn once, write anywhere
✔ Downloading template
⠋ Copying templateerror Installing pods failed. This doesn't affect project initialization and you can safely proceed.
However, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section.
However, looking at the source code, this issue as well as many other errors are not displayed correctly. The error handling part of cocoapods seems to be wrong. Moved pods error handling out of the way of the others, and added additional unknown error handling.
Test Plan:
Run react-native init TestProduct --template typescript and check correct error message.
Confirmation of pod error on pod failure.
Checklist
- [ ] Documentation is up to date to reflect these changes.
- [x] Follows commit message convention described in CONTRIBUTING.md