Skip to content

Commit 333f456

Browse files
committed
Only attempt to remove file headers from swift files
1 parent 2f84f51 commit 333f456

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/swift-bundler/Subcommands/RemoveFileHeaders.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extension Bundler {
1818
if let enumerator = FileManager.default.enumerator(at: sourcesDir, includingPropertiesForKeys: [.isRegularFileKey], options: [.skipsHiddenFiles, .skipsPackageDescendants]) {
1919
for case let fileURL as URL in enumerator {
2020
let fileAttributes = try fileURL.resourceValues(forKeys: [.isRegularFileKey])
21-
if fileAttributes.isRegularFile! {
21+
if fileAttributes.isRegularFile! && fileURL.pathExtension == "swift" {
2222
contents.append(fileURL)
2323
}
2424
}
@@ -39,4 +39,4 @@ extension Bundler {
3939
}
4040
}
4141
}
42-
}
42+
}

0 commit comments

Comments
 (0)