mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[eel] IJPL-213853 Minimal environment variables on local Eel must not include login-interactive variables
GitOrigin-RevId: 10134ef0c5214b43fc7e6988ba841d91f3e2fc1e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
557227bfb9
commit
589309f4ae
@@ -64,9 +64,7 @@ class EelLocalExecPosixApi(
|
||||
|
||||
val (cache, interactive) = when (opts.mode) {
|
||||
EelExecPosixApi.PosixEnvironmentVariablesOptions.Mode.MINIMAL -> {
|
||||
return service<CoroutineScopeService>().coroutineScope.async {
|
||||
EnvironmentUtil.getEnvironmentMap()
|
||||
}
|
||||
return CompletableDeferred(EnvironmentUtil.getSystemEnv())
|
||||
}
|
||||
|
||||
EelExecPosixApi.PosixEnvironmentVariablesOptions.Mode.LOGIN_NON_INTERACTIVE -> {
|
||||
@@ -200,9 +198,7 @@ class EelLocalExecWindowsApi : EelExecWindowsApi, LocalEelExecApi {
|
||||
override val descriptor: EelDescriptor = LocalEelDescriptor
|
||||
|
||||
override fun environmentVariables(opts: EelExecApi.EnvironmentVariablesOptions): Deferred<Map<String, String>> =
|
||||
service<CoroutineScopeService>().coroutineScope.async {
|
||||
EnvironmentUtil.getEnvironmentMap()
|
||||
}
|
||||
CompletableDeferred(EnvironmentUtil.getEnvironmentMap())
|
||||
|
||||
override suspend fun findExeFilesInPath(binaryName: String): List<EelPath> =
|
||||
findExeFilesInPath(binaryName, LOG)
|
||||
|
||||
@@ -112,7 +112,8 @@ public final class EnvironmentUtil {
|
||||
ourEnvGetter.set(loader);
|
||||
}
|
||||
|
||||
private static Map<String, String> getSystemEnv() {
|
||||
@ApiStatus.Internal
|
||||
public static Map<String, String> getSystemEnv() {
|
||||
if (OS.CURRENT == OS.Windows) {
|
||||
return Collections.unmodifiableMap(CollectionFactory.createCaseInsensitiveStringMap(System.getenv()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user