private void ForAllGits(Action<GitInstance> action)
{
foreach (var git in installedgits)
{
Directory.CreateDirectory(WorkingDirectory);
try
{
action(git);
}
finally
{
// Make sure we're not in the working directory when we try to delete it
Environment.CurrentDirectory = Path.Combine(WorkingDirectory, "..");
ITH.DeleteDirectory(WorkingDirectory);
}
}
}