Update Git.cs to work on both Windows and Linux runners
The current code uses "Environment.Name" to determine new line delimiter for reading filenames returned by GIT. This causes error for Windows agents/runners because GIT always return with "\n" for new line; whereas for Windows, the "Environment.Name" returned is "\r\n"
This commit is contained in:
Родитель
ebcbe49aed
Коммит
b08cf31a6a
|
@ -59,7 +59,7 @@ internal static class Git
|
|||
|
||||
private static ImmutableDictionary<CommitStatus, ImmutableList<FileInfo>> ParseDiffTreeOutput(string output, DirectoryInfo baseDirectory)
|
||||
{
|
||||
return output.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries)
|
||||
return output.Split("\n", StringSplitOptions.RemoveEmptyEntries)
|
||||
.Choose<string, (CommitStatus Status, FileInfo File)>(line =>
|
||||
{
|
||||
var commitStatus = TryGetCommitStatusFromOutputLine(line);
|
||||
|
|
Загрузка…
Ссылка в новой задаче