From 13d2233edcb96a59ac180e6d15c6670384133fa5 Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 8 Sep 2025 20:22:49 +0200 Subject: Fixes --- LibSystemdCli/CommandExecutor.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'LibSystemdCli/CommandExecutor.cs') diff --git a/LibSystemdCli/CommandExecutor.cs b/LibSystemdCli/CommandExecutor.cs index 096f1c1..8a21bc5 100644 --- a/LibSystemdCli/CommandExecutor.cs +++ b/LibSystemdCli/CommandExecutor.cs @@ -27,6 +27,16 @@ public class CommandExecutor throw new Exception($"Command {command} {args} failed with exit code {process.ExitCode} and error: {error}"); } + if (string.IsNullOrWhiteSpace(output)) + { + Console.WriteLine($"[{DateTime.Now:O}] Command {command} {args} produced no output."); + } + + if (!string.IsNullOrWhiteSpace(error)) + { + Console.WriteLine($"[{DateTime.Now:O}] Command {command} {args} produced error output: {error}"); + } + return output; } -- cgit 1.5.1