@ApiStatus.Internal
  public static @Nullable Boolean loadEnvironment(@NotNull Job parentJob) {
    if (!shouldLoadShellEnv()) {
      ourEnvGetter.set(CompletableDeferredKt.CompletableDeferred(getSystemEnv()));
      return null;
    }

    CompletableDeferred<Map<String, String>> envFuture = CompletableDeferredKt.CompletableDeferred(parentJob);
    ourEnvGetter.set(envFuture);
    Boolean result = Boolean.TRUE;
    try {
      Map<String, String> env = getShellEnv(Long.getLong("ij.load.shell.env.timeout", DEFAULT_SHELL_ENV_READING_TIMEOUT_MILLIS));
      setCharsetVar(env);
      envFuture.complete(Collections.unmodifiableMap(env));
    }
    catch (Throwable t) {
      result = Boolean.FALSE;
      LOG.warn("can't get shell environment", t);
      if (t instanceof ExceptionWithAttachments) {
        for (Attachment attachment : ((ExceptionWithAttachments)t).getAttachments()) {
          LOG.warn(attachment.getPath() + ":\n" + attachment.getDisplayText());
        }
      }
    }

    // execution time of 'envFuture' handlers should not be included in the "load environment" activity
    if (result == Boolean.FALSE) {
      envFuture.complete(getSystemEnv());
    }
    return result;
  }
@ApiStatus.Internal
  public static @Nullable Boolean loadEnvironment(@NotNull Job parentJob)