[ios/tooling] the install-xcode-template fails if file permissions aren't exactly as expected
Open
Nobody has claimed this yet.
iOS
- Dominant language
- Kotlin
- Stars
- 7.9k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
It looks like the bash script has no error handling, so when mkdir fails the script isn't able to copy over the templates. Due to the lack of error handling the script still thinks it succeeded
👋 ./ios/tooling/install-xcode-template.sh (🙈) ~/Developer/ribs💻
==> Copying up RIBs Xcode file templates...
mkdir: /Applications/xcode_10_fb.app/Templates/File Templates/RIBs: Permission denied
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
==> ... success!
==> RIBs have been set up. In Xcode, select 'New File...' to use RIBs templates.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ios/tooling/install-xcode-template.sh and reproduce the failure when creating the Xcode template directory lacks permission. Trace how mkdir and cp failures affect the script's final status. Done means a failed setup is reported as unsuccessful instead of printing success after the copy steps fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- mobile, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100