Skip to content

Commit 70c43a5

Browse files
authored
Merge pull request swiftlang#2858 from compnerd/the-user-is-always-correct
Workspace: assume that the user is always correct
2 parents ee8fade + cb4c4e6 commit 70c43a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/Workspace/UserToolchain.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ public final class UserToolchain: Toolchain {
121121
// We require there is at least one valid swift compiler, either in the
122122
// bin dir or SWIFT_EXEC.
123123
let resolvedBinDirCompiler: AbsolutePath
124-
if let binDirCompiler = try? UserToolchain.getTool("swiftc", binDir: binDir) {
125-
resolvedBinDirCompiler = binDirCompiler
126-
} else if let SWIFT_EXEC = SWIFT_EXEC {
124+
if let SWIFT_EXEC = SWIFT_EXEC {
127125
resolvedBinDirCompiler = SWIFT_EXEC
126+
} else if let binDirCompiler = try? UserToolchain.getTool("swiftc", binDir: binDir) {
127+
resolvedBinDirCompiler = binDirCompiler
128128
} else {
129129
// Try to lookup swift compiler on the system which is possible when
130130
// we're built outside of the Swift toolchain.

0 commit comments

Comments
 (0)