private string FindToolPath(string toolName) { string toolPath = ToolPathUtil.FindInRegistry(toolName) ?? ToolPathUtil.FindInPath(toolName) ?? ToolPathUtil.FindInProgramFiles(toolName, @"Git\bin"); if (toolPath == null) { throw new Exception("Could not find git.exe. Looked in PATH locations and various common folders inside Program Files."); } return(toolPath); }
/// <summary> /// Finds the tool path. /// </summary> /// <param name="toolName">Name of the tool.</param> /// <returns></returns> public static string FindToolPath(string toolName) { string toolPath = ToolPathUtil.FindInRegistry(toolName) ?? ToolPathUtil.FindInPath(toolName) ?? ToolPathUtil.FindInProgramFiles(toolName, @"Subversion\bin", @"CollabNet Subversion Server", @"CollabNet Subversion", @"CollabNet Subversion Client", @"VisualSVN\bin", @"VisualSVN Server\bin", @"SlikSvn\bin"); if (toolPath == null) { throw new Exception("Could not find svn.exe. Looked in PATH locations and various common folders inside Program Files."); } return(toolPath); }