Skip to content

[ios/tooling] the install-xcode-template fails if file permissions aren't exactly as expected #37

@alexvbush

Description

@alexvbush

Original issue: uber/RIBs#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions