Fix venv from zip package
@@ -293,16 +293,12 @@ namespace IronPython.Hosting {
path = Path.Combine(Path.GetDirectoryName(prefix), "pyvenv.cfg");
}
- if (pyvenv_prefix is null) {
+ prefix = pyvenv_prefix ?? prefix;
// Make sure there an IronPython Lib directory, and if not keep looking up
while (prefix != null && !File.Exists(Path.Combine(prefix, "Lib/os.py"))) {
prefix = Path.GetDirectoryName(prefix);
}
}
- else {
- prefix = pyvenv_prefix;
- }
- }
PythonContext.SetHostVariables(prefix ?? "", executable, null);
}
