mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Log a warning if couldn't read shell environment
This commit is contained in:
@@ -53,18 +53,23 @@ class PyVirtualEnvReader(val virtualEnvSdkPath: String) : EnvironmentUtil.ShellE
|
||||
}
|
||||
|
||||
override fun readShellEnv(): MutableMap<String, String> {
|
||||
if (SystemInfo.isUnix) {
|
||||
return super.readShellEnv()
|
||||
}
|
||||
else {
|
||||
if (activate != null) {
|
||||
return readVirtualEnvOnWindows(activate);
|
||||
try {
|
||||
if (SystemInfo.isUnix) {
|
||||
return super.readShellEnv()
|
||||
}
|
||||
else {
|
||||
LOG.error("Can't find activate script for $virtualEnvSdkPath")
|
||||
return mutableMapOf();
|
||||
if (activate != null) {
|
||||
return readVirtualEnvOnWindows(activate);
|
||||
}
|
||||
else {
|
||||
LOG.error("Can't find activate script for $virtualEnvSdkPath")
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
LOG.warn("Couldn't read shell environment: ${e.message}")
|
||||
}
|
||||
|
||||
return mutableMapOf()
|
||||
}
|
||||
|
||||
override fun dumpProcessEnvToFile(command: MutableList<String>, envFile: File, lineSeparator: String?): MutableMap<String, String> {
|
||||
|
||||
Reference in New Issue
Block a user