Вывод только первой строки git сообщения при ошибке

This commit is contained in:
Alexander Zhirov 2025-05-26 02:19:53 +03:00
parent 4590ee5fbc
commit 38b37eea70
Signed by: alexander
GPG key ID: C8D8BE544A27C511

View file

@ -35,11 +35,11 @@ class Snag {
currentTime.second); currentTime.second);
} }
private auto git(string[] command, string message, string separator = ":\n") { private auto git(string[] command, string message, string separator = ":\n\t") {
auto result = execute(_baseCommand ~ command); auto result = execute(_baseCommand ~ command);
if (result.status) if (result.status)
throw new SnagException( throw new SnagException(
message ~ separator ~ result.output message ~ separator ~ result.output.split('\n')[0]
); );
return result; return result;
} }