We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d48acfa + b932073 commit c8536dbCopy full SHA for c8536db
Plugins/BridgeJS/Sources/BridgeJSTool/BridgeJSTool.swift
@@ -148,7 +148,13 @@ import BridgeJSUtilities
148
exposeToGlobal: config.exposeToGlobal
149
)
150
for inputFile in inputFiles.sorted() {
151
- let content = try String(contentsOf: URL(fileURLWithPath: inputFile), encoding: .utf8)
+ let inputURL = URL(fileURLWithPath: inputFile)
152
+ // Skip directories (e.g. .docc catalogs included in target.sourceFiles)
153
+ var isDirectory: ObjCBool = false
154
+ if FileManager.default.fileExists(atPath: inputFile, isDirectory: &isDirectory), isDirectory.boolValue {
155
+ continue
156
+ }
157
+ let content = try String(contentsOf: inputURL, encoding: .utf8)
158
if hasBridgeJSSkipComment(content) {
159
continue
160
}
0 commit comments