Skip to content

Commit 50a3d0f

Browse files
committed
HACK: hardcode toolchain location
We should figure out the proper way to identify the toolchain installation rather than assuming the install location.
1 parent 1f6d793 commit 50a3d0f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Source/SourceKittenFramework/Module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public struct Module {
9292
*/
9393
public init?(spmArguments: [String], spmName: String? = nil, inPath path: String = FileManager.default.currentDirectoryPath) {
9494
fputs("Running swift build\n", stderr)
95-
let buildResults = Exec.run("/usr/bin/env", ["swift", "build"] + spmArguments, currentDirectory: path, stderr: .merge)
95+
let buildResults = Exec.run("C:\\Library\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin\\swift.exe", ["build"] + spmArguments, currentDirectory: path, stderr: .merge)
9696
guard buildResults.terminationStatus == 0 else {
9797
let file = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("swift-build-\(UUID().uuidString).log")
9898
_ = try? buildResults.data.write(to: file)

Source/SourceKittenFramework/library_wrapper.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ let toolchainLoader = Loader(searchPaths: [
158158
// MARK: - Windows
159159

160160
let toolchainLoader = Loader(searchPaths: [
161+
"C:\\Library\\Developer\\Toolchains\\unknown-Asserts-development.xctoolchain\\usr\\bin",
161162
].compactMap {
162163
FileManager.default.fileExists(atPath: $0) ? $0 : nil
163164
})

0 commit comments

Comments
 (0)