Skip to content

Commit

Permalink
CloneVerb: add more logging around checkout failures
Browse files Browse the repository at this point in the history
Signed-off-by: Derrick Stolee <stolee@gmail.com>
  • Loading branch information
derrickstolee committed Aug 28, 2019
1 parent 18186f2 commit 7fda079
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Scalar/CommandLine/CloneVerb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,13 @@ private Result CheckoutRepo()
}
}

if (this.git.ForceCheckout(this.Branch).ExitCodeIsFailure)
GitProcess.Result result = this.git.ForceCheckout(this.Branch);
if (result.ExitCodeIsFailure)
{
EventMetadata metadata = new EventMetadata();
metadata["git-output"] = result.Output;
metadata["git-errors"] = result.Errors;
this.tracer.RelatedError(metadata, "Failed to checkout repo");
return new Result("Failed to checkout repo");
}

Expand Down

0 comments on commit 7fda079

Please sign in to comment.