File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 22
33## {{releaseVersion}} - {{releaseDate}}
44
5+ ### Fixed
6+
7+ - Fix the wrong toolchain being shown as selected when using swiftly v1.0.1 ([ #2014 ] ( https://github.com/swiftlang/vscode-swift/pull/2014 ) )
8+
59## 2.14.3 - 2025-12-15
610
711### Fixed
Original file line number Diff line number Diff line change @@ -278,10 +278,16 @@ async function getQuickPickItems(
278278 ) ;
279279
280280 if ( activeToolchain ) {
281- const currentSwiftlyVersion =
282- activeToolchain . manager === "swiftly"
283- ? await Swiftly . inUseVersion ( "swiftly" , cwd )
284- : undefined ;
281+ let currentSwiftlyVersion : string | undefined = undefined ;
282+ if ( activeToolchain . manager === "swiftly" ) {
283+ currentSwiftlyVersion = await Swiftly . inUseVersion ( "swiftly" , cwd ) ;
284+ if ( currentSwiftlyVersion === undefined ) {
285+ // swiftly <1.1.0 does not support JSON output and will report no active
286+ // toolchain version. Fall back to using the active toolchain version as a
287+ // last resort.
288+ currentSwiftlyVersion = activeToolchain . swiftVersion . toString ( ) ;
289+ }
290+ }
285291 const toolchainInUse = [ ...xcodes , ...publicToolchains , ...swiftlyToolchains ] . find (
286292 toolchain => {
287293 if ( currentSwiftlyVersion ) {
You can’t perform that action at this time.
0 commit comments