Skip to content

Commit 465954d

Browse files
committed
Merge pull request #199 from aciidb0mb3r/patch-24
use basename to check for main.c instead of hasSuffix
2 parents f31fdba + 7a5108c commit 465954d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Transmute/Package+modules.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ extension Package {
8484
if !cSources.isEmpty {
8585
guard swiftSources.isEmpty else { throw Module.Error.MixedSources(path) }
8686
//FIXME: Support executables for C languages
87-
guard !cSources.contains({ $0.hasSuffix("main.c") }) else { throw Module.Error.CExecutableNotSupportedYet(path) }
87+
guard !cSources.contains({ $0.basename == "main.c" }) else { throw Module.Error.CExecutableNotSupportedYet(path) }
8888
return ClangModule(name: name, sources: Sources(paths: cSources, root: path))
8989
}
9090

0 commit comments

Comments
 (0)