Fix changeCurrentDirectory warning (#81)
- Commit
48a2d3068493d904c1810540e3aff96b65fc21ba- Author
- Kabir Oberai <[email protected]>
- When
- 2025-05-23 18:02 UTC (1 year ago)
- Parents
b5d49a6
This is `discardableResult` on macOS (perhaps because it goes through objc bridging?) but not on Linux so we get a warning on the latter
Diff
Sources/XToolSupport/SDKBuilder.swift
diff --git a/Sources/XToolSupport/SDKBuilder.swift b/Sources/XToolSupport/SDKBuilder.swiftindex 05acc1a..aa3cf5d 100644--- a/Sources/XToolSupport/SDKBuilder.swift+++ b/Sources/XToolSupport/SDKBuilder.swift@@ -330,7 +330,7 @@ struct SDKBuilder { guard FileManager.default.changeCurrentDirectoryPath(outDir) else { throw Console.Error("Could not change directory to '\(outDir)'") }- defer { FileManager.default.changeCurrentDirectoryPath(oldDirectory) }+ defer { _ = FileManager.default.changeCurrentDirectoryPath(oldDirectory) } let inputStream = DataReader.data(readingFrom: fd.rawValue)