Skip to content

Commit d38f603

Browse files
committed
Fix a deprecation warning on Linux
1 parent 7ff94d8 commit d38f603

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/swift-sh/Helpers/DepsPackage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ struct DepsPackage {
220220
/* These rules are ad-hoc and work in the case I tested (an XcodeTools dependency).
221221
* There are probably many cases where they won’t work. */
222222
if url.lastPathComponent.lowercased() == "module.modulemap",
223-
try String(contentsOf: url).contains("[system]")
223+
try String(contentsOf: url, encoding: .utf8).contains("[system]")
224224
{
225225
ret.append("-I\(url.deletingLastPathComponent().absoluteURL.path)")
226226
directoryEnumerator.skipDescendants()

0 commit comments

Comments
 (0)