Skip to content

Commit

Permalink
(cake-contribGH-738) added resolving of "git.exe"
Browse files Browse the repository at this point in the history
to all cases of resolving "git" to make them work on windows.
  • Loading branch information
nils-a committed Jan 5, 2021
1 parent 91213ea commit 193c545
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Cake.Recipe/Content/github-actions.cake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public class GitHubActionRepositoryInfo : IRepositoryInfo
else if (tempName.StartsWith(tagPrefix))
{
var gitTool = context.Tools.Resolve("git");
if (gitTool == null)
{
gitTool = context.Tools.Resolve("git.exe");
}

if (gitTool != null)
{
Expand Down
6 changes: 5 additions & 1 deletion Cake.Recipe/Content/localbuild.cake
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ public class LocalBuildRepositoryInfo : IRepositoryInfo
var rootPath = context.GitFindRootFromPath(context.MakeAbsolute(context.Environment.WorkingDirectory));

var gitTool = context.Tools.Resolve("git");

if (gitTool == null)
{
gitTool = context.Tools.Resolve("git.exe");
}

if (gitTool == null)
{
context.Warning("Unable to find git, setting default values for repository properties...");
Expand Down
6 changes: 5 additions & 1 deletion Cake.Recipe/Content/parameters.cake
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,11 @@ public static class BuildParameters
{
BranchType = BranchType.Unknown;
var gitTool = context.Tools.Resolve("git");

if (gitTool == null)
{
gitTool = context.Tools.Resolve("git.exe");
}

if (gitTool != null)
{
IEnumerable<string> redirectedStandardOutput;
Expand Down

0 comments on commit 193c545

Please sign in to comment.