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 @@ -45,7 +45,7 @@ struct ListAvailable: SwiftlyCommand {
4545 try ToolchainSelector ( parsing: input)
4646 }
4747
48- let config = try Config . load ( )
48+ var config = try Config . load ( )
4949
5050 let tc : [ ToolchainVersion ]
5151
@@ -67,15 +67,19 @@ struct ListAvailable: SwiftlyCommand {
6767 let toolchains = tc. filter { selector? . matches ( toolchain: $0) ?? true }
6868
6969 let installedToolchains = Set ( config. listInstalledToolchains ( selector: selector) )
70- let activeToolchain = config. inUse
70+ let ( inUse , _ ) = try await selectToolchain ( config: & config )
7171
7272 let printToolchain = { ( toolchain: ToolchainVersion ) in
7373 var message = " \( toolchain) "
74- if toolchain == activeToolchain {
75- message += " (installed, in use) "
76- } else if installedToolchains. contains ( toolchain) {
74+ if installedToolchains. contains ( toolchain) {
7775 message += " (installed) "
7876 }
77+ if let inUse, toolchain == inUse {
78+ message += " (in use) "
79+ }
80+ if toolchain == config. inUse {
81+ message += " (default) "
82+ }
7983 SwiftlyCore . print ( message)
8084 }
8185
You can’t perform that action at this time.
0 commit comments