“${PODS_ROOT}/SwiftLint/swiftlint"导致“命令 PhaseScriptExecution 失败,退出代码非零"使用 Xcode 10 [英] "${PODS_ROOT}/SwiftLint/swiftlint" causes "Command PhaseScriptExecution failed with a nonzero exit code" with Xcode 10
问题描述
从 Xcode 10.0 beta 2 更新到 Xcode 10.0 beta 3 我现在在构建 iOS 项目时遇到此错误:
Updating from Xcode 10.0 beta 2 to Xcode 10.0 beta 3 I now get this error at build time for an iOS project:
sourcekit: [1:connection-event-handler:10499: 0.0000] 连接中断sourcekit: [1:updateSemanticEditorDelay:10499: 0.0007] 禁用语义编辑器 10 秒sourcekit: [1:pingService:10499: 0.00007]:ping到 SourceKitService 恢复!
连接中断
永远不要为 sourcekitd 失败的文件调用此方法.:文件 File+Cache.swift,第 127 行
/Users/Coeur/Library/Developer/Xcode/DerivedData/My-App-eloayqptodupvfhbyegtkncnhcpu/Build/Intermediates.noindex/My-App.build/UAT-iphonesimulator/My-App-Debug.build/Script-379156A71D62F5C100574D line2:34382 中止陷阱:6${PODS_ROOT}/SwiftLint/swiftlint"
命令 PhaseScriptExecution 失败,退出代码非零
sourcekit: [1:connection-event-handler:10499: 0.0000] Connection interruptsourcekit: [1:updateSemanticEditorDelay:10499: 0.0007] disabling semantic editor for 10 secondssourcekit: [1:pingService:10499: 0.0007] pinging servicesourcekitten: connection to SourceKitService restored!
Connection interrupted
Never call this for file that sourcekitd fails.: file File+Cache.swift, line 127
/Users/Coeur/Library/Developer/Xcode/DerivedData/My-App-eloayqptodupvfhbyegtkncnhcpu/Build/Intermediates.noindex/My-App.build/UAT-iphonesimulator/My-App-Debug.build/Script-379156A71D62F5C100574D04.sh: line 2: 34382 Abort trap: 6 "${PODS_ROOT}/SwiftLint/swiftlint"
Command PhaseScriptExecution failed with a nonzero exit code
斯威夫特 4.1
CocoaPods 1.5.3
SwiftLint 0.26.0
Swift 4.1
CocoaPods 1.5.3
SwiftLint 0.26.0
推荐答案
使用 Xcode 10.0 beta 3 或更新版本时,SwiftLint 0.26.0 脚本似乎存在问题.
It seems to be an issue with the SwiftLint 0.26.0 script when using Xcode 10.0 beta 3 or newer.
它似乎与 SwiftLint #2276 相关,它本身与 SourceKitten 0.21.0 相关,已在 SourceKitten 0.21.1 和 SwiftLint Master 中修复.
It seems related to SwiftLint #2276, itself related to SourceKitten 0.21.0, fixed in SourceKitten 0.21.1 and SwiftLint Master.
更新到 SwiftLint 0.27.0 或更新版本:
Update to SwiftLint 0.27.0 or newer:
pod 'SwiftLint', '~> 0.27'
(并运行 pod update SwiftLint
)
这篇关于“${PODS_ROOT}/SwiftLint/swiftlint"导致“命令 PhaseScriptExecution 失败,退出代码非零"使用 Xcode 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!