File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -107,26 +107,15 @@ extension SKSwiftPMTestWorkspace {
107
107
index. pollForUnitChangesAndWait ( )
108
108
}
109
109
110
- public enum Error : Swift . Error {
111
- case buildFailure( Foundation . Process . TerminationReason , exitCode: Int32 )
112
- }
113
-
114
110
func build( ) throws {
115
- let p = Process ( )
116
- p. launchPath = String ( toolchain. swiftc!. pathString. dropLast ( ) )
117
- p. arguments = [
111
+ try Basic . Process. checkNonZeroExit ( arguments: [
112
+ String ( toolchain. swiftc!. pathString. dropLast ( ) ) ,
118
113
" build " ,
119
114
" --package-path " , sources. rootDirectory. path,
120
115
" --build-path " , buildDir. path,
121
116
" -Xswiftc " , " -index-ignore-system-modules " ,
122
117
" -Xcc " , " -index-ignore-system-symbols " ,
123
- ]
124
-
125
- p. launch ( )
126
- p. waitUntilExit ( )
127
- if p. terminationReason != . exit || p. terminationStatus != 0 {
128
- throw Error . buildFailure ( p. terminationReason, exitCode: p. terminationStatus)
129
- }
118
+ ] )
130
119
}
131
120
}
132
121
You can’t perform that action at this time.
0 commit comments