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 {
45
45
try ToolchainSelector ( parsing: input)
46
46
}
47
47
48
- let config = try Config . load ( )
48
+ var config = try Config . load ( )
49
49
50
50
let tc : [ ToolchainVersion ]
51
51
@@ -67,15 +67,19 @@ struct ListAvailable: SwiftlyCommand {
67
67
let toolchains = tc. filter { selector? . matches ( toolchain: $0) ?? true }
68
68
69
69
let installedToolchains = Set ( config. listInstalledToolchains ( selector: selector) )
70
- let activeToolchain = config. inUse
70
+ let ( inUse , _ ) = try await selectToolchain ( config: & config )
71
71
72
72
let printToolchain = { ( toolchain: ToolchainVersion ) in
73
73
var message = " \( toolchain) "
74
- if toolchain == activeToolchain {
75
- message += " (installed, in use) "
76
- } else if installedToolchains. contains ( toolchain) {
74
+ if installedToolchains. contains ( toolchain) {
77
75
message += " (installed) "
78
76
}
77
+ if let inUse, toolchain == inUse {
78
+ message += " (in use) "
79
+ }
80
+ if toolchain == config. inUse {
81
+ message += " (default) "
82
+ }
79
83
SwiftlyCore . print ( message)
80
84
}
81
85
You can’t perform that action at this time.
0 commit comments