Exemple #1
0
        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);
        }
Exemple #2
0
        /// <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);
        }