Skip to content

Commit 0e019ba

Browse files
committed
fixed bug
1 parent 94dc680 commit 0e019ba

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Python_Engine/Query/VirtualEnvironment.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ public static bool VirtualEnvironmentExists(string envName, PythonVersion python
4444
bool directoryExists = Directory.Exists(VirtualEnvironmentDirectory(envName));
4545
bool executableExists = File.Exists(VirtualEnvironmentExecutable(envName));
4646
bool kernelExists = Directory.Exists(VirtualEnvironmentKernel(envName));
47-
bool versionMatches = Version(VirtualEnvironmentExecutable(envName)) == pythonVersion;
47+
bool versionMatches = false;
48+
if (executableExists)
49+
versionMatches = Version(VirtualEnvironmentExecutable(envName)) == pythonVersion;
4850

4951
if (pythonVersion == PythonVersion.Undefined)
5052
return directoryExists && executableExists && kernelExists;

0 commit comments

Comments
 (0)