You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix swiftc selection for the case no swiftc found in Swift SDK (#7296)
Fix `PATH` executable selection in `UserToolchain`
### Motivation:
When `swiftc` is not in the toolchain bin directory of Swift SDK, system
swiftc in PATH should be used. But the current implementation of
`UserToolchain` always picks the last found entry in the PATH instead of
the first one. This behavior was introduced by
22c2493
The causes actual issues when:
1. More than two `swiftc` are in `PATH`
2. The invoked `swift-build` is placed from outside of toolchain bin
directory
Then it uses the last found `swiftc` in `PATH` even though we expect the
first one.
### Modifications:
Fixed the order of `PATH` selection to prefer the first entry.
### Result:
The first found `swiftc` is used as well as shell PATH selection.
0 commit comments