Skip to content

Commit

Permalink
Add a newline to the end of stdout before exiting (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN authored May 9, 2024
1 parent 1aff119 commit b81a6eb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions TwitchDownloaderCLI/Tools/CliTaskProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,15 @@ private void WriteNewLineMessage(string preamble, string message)
Console.WriteLine(message);
_lastWriteHadNewLine = true;
}

~CliTaskProgress()
{
if (!_lastWriteHadNewLine)
{
// Some shells don't like when an application exits without writing a newline to the end of stdout
Console.WriteLine();
_lastWriteHadNewLine = true;
}
}
}
}

0 comments on commit b81a6eb

Please sign in to comment.