Add architecture detection to Xcode script configuration (#4873)

This commit is contained in:
Frad LEE 2023-04-18 02:48:06 +08:00 committed by GitHub
parent f9b0e9f0af
commit 5814ec1a1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -158,7 +158,10 @@ folder by default. To instruct Xcode where to find SwiftLint, you can either add
`/opt/homebrew/bin` to the `PATH` environment variable in your build phase
```bash
export PATH="$PATH:/opt/homebrew/bin"
if [[ "$(uname -m)" == arm64 ]]; then
export PATH="/opt/homebrew/bin:$PATH"
fi
if which swiftlint > /dev/null; then
swiftlint
else