Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Sources/CapacitorPluginTools/CapacitorPluginPackage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,15 @@ public class CapacitorPluginPackage {
print("Warning: file \(fileURL.path()) not found, trying PluginTests.swift")
}

let backupFileURL = iosSrcDirectoryURL.appending(path: "PluginTests").appending(path: "PluginTests.swift")
var backupFileURL = iosSrcDirectoryURL.appending(path: "PluginTests").appending(path: "PluginTests.swift")

if (try? backupFileURL.checkResourceIsReachable()) == true {
return backupFileURL
} else {
print("Warning: file \(backupFileURL.path()) not found")
Comment thread
OS-pedrogustavobilro marked this conversation as resolved.
}

backupFileURL = iosSrcDirectoryURL.appending(path: "PluginTests").appending(path: fileName.replacingOccurrences(of: "Plugin", with: ""))
if (try? backupFileURL.checkResourceIsReachable()) == true {
return backupFileURL
}
Expand Down