File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,6 @@ public final class XcodeBuildSystem: SPMBuildCore.BuildSystem {
103
103
104
104
arguments += buildParameters. xcbuildFlags
105
105
106
- let delegate = createBuildDelegate ( )
107
-
108
106
let process = Process ( arguments: arguments, outputRedirection: . collect)
109
107
try process. launch ( )
110
108
let result = try process. waitUntilExit ( )
@@ -119,10 +117,15 @@ public final class XcodeBuildSystem: SPMBuildCore.BuildSystem {
119
117
120
118
let stdout = try result. output. get ( )
121
119
if !stdout. isEmpty {
122
- try delegate. parse ( bytes: result. output. get ( ) )
120
+ let delegate = createBuildDelegate ( )
121
+ delegate. parse ( bytes: stdout)
123
122
} else {
124
123
let stderr = try result. utf8stderrOutput ( )
125
- self . diagnostics. emit ( StringError ( stderr) )
124
+ if !stderr. isEmpty {
125
+ diagnostics. emit ( StringError ( stderr) )
126
+ } else {
127
+ diagnostics. emit ( StringError ( " Unknown error: stdout and stderr are empty " ) )
128
+ }
126
129
}
127
130
}
128
131
You can’t perform that action at this time.
0 commit comments