mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
For some strange reason bash doesn't pass env variables sourced from rcfile to the command in case of non-interactive mode.
Interactive mode can crash the process, so it is not an option. The only option left is to use composite command that sources the activate script and then prints envs. And this works both for bash and sh on Linux.
This commit is contained in:
@@ -85,12 +85,7 @@ class PyVirtualEnvReader(val virtualEnvSdkPath: String) : EnvironmentUtil.ShellE
|
||||
}
|
||||
|
||||
return if (activate != null)
|
||||
if (File(shellPath).name == "bash") {
|
||||
mutableListOf(shellPath, "--rcfile", activate)
|
||||
}
|
||||
else {
|
||||
mutableListOf(shellPath, "-c", "source '$activate'")
|
||||
}
|
||||
mutableListOf(shellPath, "-c", "source '$activate'")
|
||||
else super.getShellProcessCommand()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user