Skip to content
New issue

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

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

Already on GitHub? # to your account

Crashes when there is no .swiftlint.yml in home directory #4

Closed
garrett-davidson opened this issue May 15, 2016 · 2 comments
Closed
Labels

Comments

@garrett-davidson
Copy link

If the user building the project doesn't have a .swiftlint.yml in their home directory, ExtraBuildPhase crashes

@norio-nomura
Copy link
Owner

Thanks for reporting.
Sorry, the issue is caused by the script that ExtraBuildPhase generates.
For workaround, you can customize the script as following configuration:

defaults write io.github.norio-nomura.ExtraBuildPhase shellScript -string '
if which swiftlint >/dev/null; then
    [ -f .swiftlint.yml ] && CONFIG="--config .swiftlint.yml" || [ -f $HOME/.swiftlint.yml ] && CONFIG="--config $HOME/.swiftlint.yml"
    swiftlint lint --quiet --use-script-input-files $CONFIG
fi
exit 0 # ignore result of swiftlint
'

Running clean build is required for taking effect of the configuration.

@norio-nomura
Copy link
Owner

Fixed by https://github.com/norio-nomura/ExtraBuildPhase/releases/tag/0.3.5

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants