Skip to content

Commit

Permalink
Only attempt to remove file headers from swift files
Browse files Browse the repository at this point in the history
  • Loading branch information
stackotter committed Jan 12, 2022
1 parent 2f84f51 commit 333f456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/swift-bundler/Subcommands/RemoveFileHeaders.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ extension Bundler {
if let enumerator = FileManager.default.enumerator(at: sourcesDir, includingPropertiesForKeys: [.isRegularFileKey], options: [.skipsHiddenFiles, .skipsPackageDescendants]) {
for case let fileURL as URL in enumerator {
let fileAttributes = try fileURL.resourceValues(forKeys: [.isRegularFileKey])
if fileAttributes.isRegularFile! {
if fileAttributes.isRegularFile! && fileURL.pathExtension == "swift" {
contents.append(fileURL)
}
}
Expand All @@ -39,4 +39,4 @@ extension Bundler {
}
}
}
}
}

0 comments on commit 333f456

Please sign in to comment.