File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,16 @@ public func generate(
87
87
// Find non-source files in the source directories and root that should be added
88
88
// as a reference to the project.
89
89
var extraFiles = try findNonSourceFiles ( path: srcroot)
90
- if let sourcesExtraFiles = try ? findNonSourceFiles ( path: srcroot. appending ( component: " Sources " ) , recursively: true ) {
90
+
91
+ let sourcesDirectory = srcroot. appending ( component: " Sources " )
92
+ if localFileSystem. isDirectory ( sourcesDirectory) {
93
+ let sourcesExtraFiles = try findNonSourceFiles ( path: sourcesDirectory, recursively: true )
91
94
extraFiles. append ( contentsOf: sourcesExtraFiles)
92
95
}
93
- if let testsExtraFiles = try ? findNonSourceFiles ( path: srcroot. appending ( component: " Tests " ) , recursively: true ) {
96
+
97
+ let testsDirectory = srcroot. appending ( component: " Tests " )
98
+ if localFileSystem. isDirectory ( testsDirectory) {
99
+ let testsExtraFiles = try findNonSourceFiles ( path: testsDirectory, recursively: true )
94
100
extraFiles. append ( contentsOf: testsExtraFiles)
95
101
}
96
102
You can’t perform that action at this time.
0 commit comments