File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ struct ListAvailable: SwiftlyCommand {
4949 try ToolchainSelector ( parsing: input)
5050 }
5151
52- let config = try Config . load ( ctx)
52+ var config = try Config . load ( ctx)
5353
5454 let tc : [ ToolchainVersion ]
5555
@@ -71,15 +71,19 @@ struct ListAvailable: SwiftlyCommand {
7171 let toolchains = tc. filter { selector? . matches ( toolchain: $0) ?? true }
7272
7373 let installedToolchains = Set ( config. listInstalledToolchains ( selector: selector) )
74- let activeToolchain = config. inUse
74+ let ( inUse , _ ) = try await selectToolchain ( ctx , config: & config )
7575
7676 let printToolchain = { ( toolchain: ToolchainVersion ) in
7777 var message = " \( toolchain) "
78- if toolchain == activeToolchain {
79- message += " (installed, in use) "
80- } else if installedToolchains. contains ( toolchain) {
78+ if installedToolchains. contains ( toolchain) {
8179 message += " (installed) "
8280 }
81+ if let inUse, toolchain == inUse {
82+ message += " (in use) "
83+ }
84+ if toolchain == config. inUse {
85+ message += " (default) "
86+ }
8387 await ctx. print ( message)
8488 }
8589
You can’t perform that action at this time.
0 commit comments