@SuppressWarnings("SpellCheckingInspection")
  public static void updateVMOptions(Path newConfigDir, Logger log) {
    Path vmOptionsFile = newConfigDir.resolve(VMOptions.getFileName());
    if (Files.exists(vmOptionsFile)) {
      try {
        List<String> lines = Files.readAllLines(vmOptionsFile, VMOptions.getFileCharset());
        boolean updated = updateVMOptionsLines(newConfigDir, lines, log);

        if (updated) {
          Files.write(vmOptionsFile, lines, VMOptions.getFileCharset());
        }
      }
      catch (IOException e) {
        log.warn("Failed to update custom VM options file " + vmOptionsFile, e);
      }
    }
  }
@SuppressWarnings("SpellCheckingInspection")
  public static void updateVMOptions(Path newConfigDir, Logger log)