private static File findHandlePath()

in agent/src/jetbrains/buildServer/swabra/processes/HandlePathProvider.java [32:49]


  private static File findHandlePath(@NotNull SwabraLogger logger, @Nullable final BundledTool handleTool) {
    String path = handleTool == null ? null : getHandlePath(handleTool);
    if (StringUtil.isEmptyOrSpaces(path)) {
      logDetectionDisabled("Path to handle.exe tool is not defined. Use Swabra settings to install handle.exe", logger);
      return null;
    }
    if (!SwabraUtil.unifyPath(path).endsWith(HANDLE_PATH_SUFFIX)) {
      logDetectionDisabled("Path to handle.exe tool must end with: " + HANDLE_PATH_SUFFIX, logger);
      return null;
    }
    final File handleFile = new File(path);
    if (!handleFile.isFile()) {
      logDetectionDisabled("No executable found at " + path, logger);
      return null;
    }

    return handleFile;
  }