File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed
Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -180,17 +180,24 @@ public void FindJetBrainsFromToolbox(Func<string> platformFinder)
180180 var state = Path . Combine ( platformFinder ( ) , "state.json" ) ;
181181 if ( File . Exists ( state ) )
182182 {
183- using var stream = File . OpenRead ( state ) ;
184- var stateData = JsonSerializer . Deserialize ( stream , JsonCodeGen . Default . JetBrainsState ) ;
185- foreach ( var tool in stateData . Tools )
183+ try
186184 {
187- if ( exclude . Contains ( tool . ToolId . ToLowerInvariant ( ) ) )
188- continue ;
189-
190- Tools . Add ( new ExternalTool (
191- $ "{ tool . DisplayName } { tool . DisplayVersion } ",
192- supportedIcons . Contains ( tool . ProductCode ) ? $ "JetBrains/{ tool . ProductCode } " : "JetBrains/JB" ,
193- Path . Combine ( tool . InstallLocation , tool . LaunchCommand ) ) ) ;
185+ using var stream = File . OpenRead ( state ) ;
186+ var stateData = JsonSerializer . Deserialize ( stream , JsonCodeGen . Default . JetBrainsState ) ;
187+ foreach ( var tool in stateData . Tools )
188+ {
189+ if ( exclude . Contains ( tool . ToolId . ToLowerInvariant ( ) ) )
190+ continue ;
191+
192+ Tools . Add ( new ExternalTool (
193+ $ "{ tool . DisplayName } { tool . DisplayVersion } ",
194+ supportedIcons . Contains ( tool . ProductCode ) ? $ "JetBrains/{ tool . ProductCode } " : "JetBrains/JB" ,
195+ Path . Combine ( tool . InstallLocation , tool . LaunchCommand ) ) ) ;
196+ }
197+ }
198+ catch
199+ {
200+ // Ignore exceptions.
194201 }
195202 }
196203 }
You can’t perform that action at this time.
0 commit comments