File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,12 @@ package struct RunSourceKitdRequestCommand: AsyncParsableCommand {
76
76
77
77
let request = try requestString. cString ( using: . utf8) !. withUnsafeBufferPointer { buffer in
78
78
var error : UnsafeMutablePointer < CChar > ?
79
- let req = sourcekitd. api. request_create_from_yaml ( buffer. baseAddress!, & error) !
79
+ let req = sourcekitd. api. request_create_from_yaml ( buffer. baseAddress!, & error)
80
80
if let error {
81
- throw GenericError ( " Failed to parse sourcekitd request from JSON: \( String ( cString: error) ) " )
81
+ throw GenericError ( " Failed to parse sourcekitd request from YAML: \( String ( cString: error) ) " )
82
+ }
83
+ guard let req else {
84
+ throw GenericError ( " Failed to parse request from YAML but did not produce error " )
82
85
}
83
86
return req
84
87
}
You can’t perform that action at this time.
0 commit comments