Skip to content

Commit 5e21819

Browse files
jbevainGitHub Enterprise
authored andcommitted
Code style
1 parent 4819ba3 commit 5e21819

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Packages/com.unity.ide.visualstudio/Editor/VisualStudioCodeInstallation.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ public static bool TryDiscoverInstallation(string editorPath, out IVisualStudioI
103103
manifestBase = IOPath.GetDirectoryName(manifestBase);
104104
else if (VisualStudioEditor.IsOSX) // on Mac, editorPath is a directory
105105
manifestBase = IOPath.Combine(manifestBase, "Contents");
106-
else {
106+
else
107+
{
107108
// on Linux, editorPath is a file, in a bin sub-directory
108109
var parent = Directory.GetParent(manifestBase);
109110
// but we can link to [vscode]/code or [vscode]/bin/code
@@ -178,7 +179,8 @@ public static IEnumerable<IVisualStudioInstallation> GetVisualStudioInstallation
178179

179180
private static readonly Regex DesktopFileExecEntry = new Regex(@"Exec=(\S+)", RegexOptions.Singleline | RegexOptions.Compiled);
180181

181-
private static IEnumerable<string> GetXdgCandidates() {
182+
private static IEnumerable<string> GetXdgCandidates()
183+
{
182184
var envdirs = Environment.GetEnvironmentVariable("XDG_DATA_DIRS");
183185
if (string.IsNullOrEmpty(envdirs))
184186
yield break;
@@ -188,14 +190,17 @@ private static IEnumerable<string> GetXdgCandidates() {
188190
{
189191
Match match = null;
190192

191-
try {
193+
try
194+
{
192195
var desktopFile = IOPath.Combine(dir, "applications/code.desktop");
193196
if (!File.Exists(desktopFile))
194197
continue;
195198

196199
var content = File.ReadAllText(desktopFile);
197200
match = DesktopFileExecEntry.Match(content);
198-
} catch {
201+
}
202+
catch
203+
{
199204
// do not fail if we cannot read desktop file
200205
}
201206

0 commit comments

Comments
 (0)