@@ -12,14 +12,14 @@ import TSCBasic
12
12
import Foundation
13
13
14
14
public enum PkgConfigError : Swift . Error , CustomStringConvertible {
15
- case couldNotFindConfigFile
15
+ case couldNotFindConfigFile( name : String )
16
16
case parsingError( String )
17
17
case nonWhitelistedFlags( String )
18
18
19
19
public var description : String {
20
20
switch self {
21
- case . couldNotFindConfigFile:
22
- return " couldn't find pc file "
21
+ case . couldNotFindConfigFile( let name ) :
22
+ return " couldn't find pc file for \( name ) "
23
23
case . parsingError( let error) :
24
24
return " parsing error(s): \( error) "
25
25
case . nonWhitelistedFlags( let flags) :
@@ -89,7 +89,7 @@ public struct PCFileFinder {
89
89
PCFileFinder . shouldEmitPkgConfigPathsDiagnostic = false
90
90
diagnostics. emit ( warning: " failed to retrieve search paths with pkg-config; maybe pkg-config is not installed " )
91
91
}
92
- throw PkgConfigError . couldNotFindConfigFile
92
+ throw PkgConfigError . couldNotFindConfigFile ( name : name )
93
93
}
94
94
}
95
95
@@ -131,7 +131,7 @@ public struct PkgConfig {
131
131
) throws {
132
132
133
133
if let path = try ? AbsolutePath ( validating: name) {
134
- guard fileSystem. isFile ( path) else { throw PkgConfigError . couldNotFindConfigFile }
134
+ guard fileSystem. isFile ( path) else { throw PkgConfigError . couldNotFindConfigFile ( name : name ) }
135
135
self . name = path. basenameWithoutExt
136
136
self . pcFile = path
137
137
} else {
0 commit comments