[ios/tooling] the install-xcode-template fails if file permissions aren't exactly as expected
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 193
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Original issue: https://github.com/uber/RIBs/issues/293
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 reported permission-denied case against an Xcode installation whose template directory is not writable. Trace how mkdir and cp failures are handled; done means the script reports failure and does not print success when setup did not complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- mobile-dev, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100