Command PhaseScriptExecution failed with a nonzero exit code
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I've Updated SwiftLint to the latest version.
- I've searched for existing GitHub issues.
Bug Description
We've been using the following script in build phase for the past 3 years.
if [[ "$(uname -m)" == arm64 ]]
then
export PATH="/opt/homebrew/bin:$PATH"
fi
if which swiftlint >/dev/null; then
swiftlint --fix && swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
exit 1
fi
Everything works until yesterday. The build failed at the script execution, and here is the error
Then we have to put project folder and unit test folders explicitly under included: section in .swiftLint.yml to get the project build.
I am not sure this is the issue of swiftlint or datadog or both but it seems quit similar to this issue https://github.com/realm/SwiftLint/issues/4127, which was posted 3 years ago.
Environment
- SwiftLint version: 0.59.1
- Xcode version: Xcode 16.0, Build version 16A242d
- Installation method used (Homebrew)
- Configuration file:
disabled_rules:
- statement_position # https://realm.github.io/SwiftLint/statement_position.html
- colon
- nesting
- line_length
- identifier_name
- multiple_closures_with_trailing_closure
- cyclomatic_complexity
- function_body_length
- type_name
- file_length
- type_body_length
- function_parameter_count
- large_tuple
- redundant_discardable_let
- for_where
included:
- [PROJECT_FOLDER]
- [UNIT_TEST_FOLDER]
- [UI_TEST_FOLDER]
excluded:
- Packages/[SOME_PACKAGE_FILE]
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 the reported build-phase script and the supplied .swiftLint.yml configuration, then reproduce the failure using SwiftLint 0.59.1 installed through Homebrew with Xcode 16. Compare behavior with and without the explicit included project and test folders, and determine whether the build completes without requiring those paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100