mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
EelLocalExecApi: Inherit env vars by default.
Lackage of `PATH` breaks many tools including python GitOrigin-RevId: a522f6afaa8f94dc18ae2151833b2f9e69172bc5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
845656d8e2
commit
c2a06caab3
@@ -18,11 +18,13 @@ class EelLocalExecApi : EelExecApi {
|
||||
|
||||
val process: LocalEelProcess =
|
||||
try {
|
||||
// Inherit env vars, because lack of `PATH` might break things
|
||||
val environment = System.getenv() + builder.env
|
||||
if (pty != null) {
|
||||
LocalEelProcess(PtyProcessBuilder()
|
||||
.setConsole(true)
|
||||
.setCommand(arrayOf(builder.exe) + args)
|
||||
.setEnvironment(builder.env)
|
||||
.setEnvironment(environment)
|
||||
.setDirectory(builder.workingDirectory)
|
||||
.setInitialColumns(pty.columns)
|
||||
.setInitialRows(pty.rows)
|
||||
@@ -30,7 +32,7 @@ class EelLocalExecApi : EelExecApi {
|
||||
}
|
||||
else {
|
||||
LocalEelProcess(ProcessBuilder(builder.exe, *args).apply {
|
||||
environment().putAll(builder.env)
|
||||
environment().putAll(environment)
|
||||
builder.workingDirectory?.let {
|
||||
directory(File(it))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user