Skip to content

Commit

Permalink
No more unnecessary empty "stderr:" lines in log
Browse files Browse the repository at this point in the history
Many times stderr's contents are just a single newline; there's no need
to write that to the progress log. We also don't need to write double
newlines to the log, so trim the final trailing newline before writing.
  • Loading branch information
rmunn committed Aug 14, 2024
1 parent 522bf9f commit 4a5a201
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/LibChorus/VcsDrivers/Mercurial/HgRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -702,13 +702,13 @@ private ExecutionResult ExecuteErrorsOk(string command, int secondsBeforeTimeout
{
throw new UserCancelledException();
}
if (!string.IsNullOrEmpty(result.StandardError))
if (!string.IsNullOrWhiteSpace(result.StandardError))
{
_progress.WriteVerbose("standerr: " + result.StandardError);//not necessarily an *error* down this deep
_progress.WriteVerbose("standerr: " + result.StandardError.TrimEnd());//not necessarily an *error* down this deep
}
if (!string.IsNullOrEmpty(result.StandardOutput))
if (!string.IsNullOrWhiteSpace(result.StandardOutput))
{
_progress.WriteVerbose("standout: " + result.StandardOutput);//not necessarily an *error* down this deep
_progress.WriteVerbose("standout: " + result.StandardOutput.TrimEnd());//not necessarily an *error* down this deep
}

#if DEBUG
Expand Down

0 comments on commit 4a5a201

Please sign in to comment.