Skip to content

Commit

Permalink
feat(cli): prevent mixing stdout, stderr streams
Browse files Browse the repository at this point in the history
Co-Authored-By: Hong Minhee <hong.minhee@gmail.com>
  • Loading branch information
moreal and dahlia committed Jan 5, 2021
1 parent a179920 commit d1dd447
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Libplanet.Tools/Mpt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,15 @@ public void List(
"ALIAS",
"PATH");
Console.Error.WriteLine(new string('-', 3 + maxAliasLength + maxPathLength));
Console.Error.Flush();
foreach (KeyValuePair<string, string> pair in aliases)
{
Console.Write($"{{0,-{maxAliasLength}}} ", pair.Key);
Console.Out.Flush();
Console.Error.Write("| ");
Console.Error.Flush();
Console.WriteLine($"{{0,-{maxPathLength}}}", pair.Value);
Console.Out.Flush();
}
}

Expand Down

0 comments on commit d1dd447

Please sign in to comment.