Skip to content

Commit

Permalink
fix issue when repo/path contains spaces (#3985)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-ivlev authored Oct 10, 2022
1 parent 3092805 commit ca20a05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Agent.Plugins/TfsVCCliManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,10 @@ await processInvoker.ExecuteAsync(

private void CleanupTfsVCOutput(ref TfsVCPorcelainCommandResult command, string executedCommand)
{
// tf.exe removes double quotes from the output, we also replace it in the input command to correctly find the extra output
List<string> stringsToRemove = command
.Output
.Where(item => item.Contains(executedCommand))
.Where(item => item.Contains(executedCommand.Replace("\"", "")))
.ToList();
command.Output.RemoveAll(item => stringsToRemove.Contains(item));
}
Expand Down
3 changes: 2 additions & 1 deletion src/Agent.Worker/Build/TfsVCCommandManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,10 @@ await processInvoker.ExecuteAsync(

private void CleanupTfsVCOutput(ref TfsVCPorcelainCommandResult command, string executedCommand)
{
// tf.exe removes double quotes from the output, we also replace it in the input command to correctly find the extra output
List<string> stringsToRemove = command
.Output
.Where(item => item.Contains(executedCommand))
.Where(item => item.Contains(executedCommand.Replace("\"", "")))
.ToList();
command.Output.RemoveAll(item => stringsToRemove.Contains(item));
}
Expand Down

0 comments on commit ca20a05

Please sign in to comment.