File tree Expand file tree Collapse file tree
Sources/CapacitorPluginTools Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,8 +121,15 @@ public class CapacitorPluginPackage {
121121 print ( " Warning: file \( fileURL. path ( ) ) not found, trying PluginTests.swift " )
122122 }
123123
124- let backupFileURL = iosSrcDirectoryURL. appending ( path: " PluginTests " ) . appending ( path: " PluginTests.swift " )
124+ var backupFileURL = iosSrcDirectoryURL. appending ( path: " PluginTests " ) . appending ( path: " PluginTests.swift " )
125125
126+ if ( try ? backupFileURL. checkResourceIsReachable ( ) ) == true {
127+ return backupFileURL
128+ } else {
129+ print ( " Warning: file \( backupFileURL. path ( ) ) not found " )
130+ }
131+
132+ backupFileURL = iosSrcDirectoryURL. appending ( path: " PluginTests " ) . appending ( path: fileName. replacingOccurrences ( of: " Plugin " , with: " " ) )
126133 if ( try ? backupFileURL. checkResourceIsReachable ( ) ) == true {
127134 return backupFileURL
128135 }
You can’t perform that action at this time.
0 commit comments