From 472e740ecc470880ca817e33d68dcd1b359c3e31 Mon Sep 17 00:00:00 2001 From: Adam Thorn <alt36@cam.ac.uk> Date: Wed, 10 Jun 2020 17:38:50 +0100 Subject: [PATCH] Don't log wpkg output when there's nothing to log --- WpkgInstaller/WpkgInstaller.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WpkgInstaller/WpkgInstaller.cs b/WpkgInstaller/WpkgInstaller.cs index dcf3865..7a663b2 100755 --- a/WpkgInstaller/WpkgInstaller.cs +++ b/WpkgInstaller/WpkgInstaller.cs @@ -124,7 +124,7 @@ namespace WpkgInstaller private void WriteStdoutToLog(object sendingProcess, DataReceivedEventArgs e) { - if (e != null) + if (e != null && e.Data != null) { eventLog.WriteEntry(e.Data, EventLogEntryType.Information); } @@ -133,7 +133,7 @@ namespace WpkgInstaller private void WriteStderrToLog(object sendingProcess, DataReceivedEventArgs e) { - if (e != null) + if (e != null && e.Data != null) { eventLog.WriteEntry(e.Data, EventLogEntryType.Error); } -- GitLab