File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Packages/com.unity.ide.visualstudio/Editor Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,8 @@ public static IEnumerable<IVisualStudioInstallation> GetVisualStudioInstallation
176176#if UNITY_EDITOR_LINUX
177177 private static readonly Regex DesktopFileExecEntry = new Regex ( @"Exec=(\S+)" , RegexOptions . Singleline | RegexOptions . Compiled ) ;
178178
179- private static IEnumerable < string > GetXdgCandidates ( ) {
179+ private static IEnumerable < string > GetXdgCandidates ( )
180+ {
180181 var envdirs = Environment . GetEnvironmentVariable ( "XDG_DATA_DIRS" ) ;
181182 if ( string . IsNullOrEmpty ( envdirs ) )
182183 yield break ;
@@ -186,14 +187,17 @@ private static IEnumerable<string> GetXdgCandidates() {
186187 {
187188 Match match = null ;
188189
189- try {
190+ try
191+ {
190192 var desktopFile = IOPath . Combine ( dir , "applications/code.desktop" ) ;
191193 if ( ! File . Exists ( desktopFile ) )
192194 continue ;
193195
194196 var content = File . ReadAllText ( desktopFile ) ;
195197 match = DesktopFileExecEntry . Match ( content ) ;
196- } catch {
198+ }
199+ catch
200+ {
197201 // do not fail if we cannot read desktop file
198202 }
199203
You can’t perform that action at this time.
0 commit comments