Skip to content

Commit a74933f

Browse files
committed
[swiftpm] Fix the bin path we pass to hostDestination
There is not guarantee that the toolchain.path contains `usr/bin`. Instead, look at the diretory containing `swiftc`.
1 parent 194f793 commit a74933f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SKSwiftPMWorkspace/SwiftPMWorkspace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public final class SwiftPMWorkspace {
6969

7070
self.packageRoot = resolveSymlinks(packageRoot)
7171

72-
guard let destinationToolchainBinDir = toolchainRegistry.default?.path?.appending(components: "usr", "bin") else {
72+
guard let destinationToolchainBinDir = toolchainRegistry.default?.swiftc?.parentDirectory else {
7373
throw Error.cannotDetermineHostToolchain
7474
}
7575

0 commit comments

Comments
 (0)