code: static void mergeEnvPathList(Map<String, String> userEnv, String envKey, String pathList) {
      if (!isEmpty(pathList)) {
        String current = firstNonEmpty(userEnv.get(envKey), System.getenv(envKey));
        userEnv.put(envKey, join(File.pathSeparator, current, pathList));
      }
    }
docs: Updates the user environment, appending the given pathList to the existing value of the given
  environment variable (or setting it if it hasn't yet been set).