Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
UpdateAssemblyInfo: Look for git in %ProgramFiles%\Git\Bin if it's no…
Browse files Browse the repository at this point in the history
…t in the PATH.
  • Loading branch information
dgrunwald committed Aug 28, 2010
1 parent 8d49a9c commit 4ffeec8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Tools/UpdateAssemblyInfo/Main.cs
Expand Up @@ -190,6 +190,9 @@ static void RetrieveRevisionNumber()
static void ReadRevisionNumberFromGit()
{
ProcessStartInfo info = new ProcessStartInfo("cmd", "/c git rev-list " + BaseCommit + "..HEAD");
string path = Environment.GetEnvironmentVariable("PATH");
path += ";" + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "git\\bin");
info.EnvironmentVariables["PATH"] = path;
info.RedirectStandardOutput = true;
info.UseShellExecute = false;
using (Process p = Process.Start(info)) {
Expand Down

0 comments on commit 4ffeec8

Please sign in to comment.