Skip to content

Commit 94e036f

Browse files
committed
Inline
1 parent debcc81 commit 94e036f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,12 @@ public static bool TryDiscoverInstallation(string editorPath, out IVisualStudioI
140140
return false;
141141

142142
// On windows we use the executable directly, so we can query extra information
143-
var fvi = editorPath;
144-
145-
if (!File.Exists(fvi))
143+
if (!File.Exists(editorPath))
146144
return false;
147145

148146
// VS preview are not using the isPrerelease flag so far
149147
// On Windows FileDescription contains "Preview", but not on Mac
150-
var vi = FileVersionInfo.GetVersionInfo(fvi);
148+
var vi = FileVersionInfo.GetVersionInfo(editorPath);
151149
var version = new Version(vi.ProductVersion);
152150
var isPrerelease = vi.IsPreRelease || string.Concat(editorPath, "/" + vi.FileDescription).ToLower().Contains("preview");
153151

0 commit comments

Comments
 (0)