File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 908
908
},
909
909
{
910
910
"command" : " swift.switchPlatform" ,
911
- "when" : " swift.isActivated && isMac && swift. switchPlatformAvailable"
911
+ "when" : " swift.switchPlatformAvailable"
912
912
},
913
913
{
914
914
"command" : " swift.insertFunctionComment" ,
Original file line number Diff line number Diff line change @@ -110,9 +110,10 @@ function createContextKeys(): ContextKeys {
110
110
this . createNewProjectAvailable = toolchainVersion . isGreaterThanOrEqual (
111
111
new Version ( 5 , 8 , 0 )
112
112
) ;
113
- this . switchPlatformAvailable = toolchainVersion . isGreaterThanOrEqual (
114
- new Version ( 6 , 1 , 0 )
115
- ) ;
113
+ this . switchPlatformAvailable =
114
+ process . platform === "darwin"
115
+ ? toolchainVersion . isGreaterThanOrEqual ( new Version ( 6 , 1 , 0 ) )
116
+ : false ;
116
117
} ,
117
118
118
119
get isActivated ( ) {
Original file line number Diff line number Diff line change @@ -243,8 +243,6 @@ async function createActiveToolchain(
243
243
} catch ( error ) {
244
244
outputChannel . log ( "Failed to discover Swift toolchain" ) ;
245
245
outputChannel . log ( `${ error } ` ) ;
246
- contextKeys . createNewProjectAvailable = false ;
247
- contextKeys . switchPlatformAvailable = false ;
248
246
return undefined ;
249
247
}
250
248
}
You can’t perform that action at this time.
0 commit comments