mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Trim console lines.
This commit is contained in:
parent
80e7f72ea8
commit
b25a266522
@ -95,6 +95,4 @@ systemctl restart remotely.service
|
||||
|
||||
|
||||
# Restart caddy
|
||||
systemctl restart caddy
|
||||
|
||||
echo "Installation completed."
|
||||
systemctl restart caddy
|
||||
@ -31,12 +31,18 @@ namespace Remotely.Shared.Utilities
|
||||
for (var i = 0; i < message.Length;)
|
||||
{
|
||||
var lineCount = 0;
|
||||
var trimLine = i > 0;
|
||||
|
||||
var line = new string(message.Skip(i).TakeWhile(x => {
|
||||
i++;
|
||||
return lineCount++ < 50 || !char.IsWhiteSpace(x);
|
||||
}).ToArray());
|
||||
|
||||
if (trimLine)
|
||||
{
|
||||
line = line.Trim();
|
||||
}
|
||||
|
||||
Console.WriteLine(line);
|
||||
}
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user