summary refs log tree commit diff
path: root/LibSystemdCli/CommandExecutor.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-09-08 20:22:49 +0200
committerRory& <root@rory.gay>2025-09-08 20:22:49 +0200
commit13d2233edcb96a59ac180e6d15c6670384133fa5 (patch)
treeff1ab9140f76b2c9a22c09d3e9410bf190edc92d /LibSystemdCli/CommandExecutor.cs
parentdotnet 9 (diff)
downloadSystemdCtl-13d2233edcb96a59ac180e6d15c6670384133fa5.tar.xz
Fixes HEAD master
Diffstat (limited to 'LibSystemdCli/CommandExecutor.cs')
-rw-r--r--LibSystemdCli/CommandExecutor.cs10
1 files changed, 10 insertions, 0 deletions
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; }