[chronojump/execute-process: 5/5] Makes sure to not have any non-needed end of line when executing a process.



commit 1e44bc8443774bad84a7d86400d7455142bef1e9
Author: Carles Pina i Estany <carles pina cat>
Date:   Wed Oct 5 00:24:37 2016 +0200

    Makes sure to not have any non-needed end of line when executing a process.

 src/executeProcess.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/executeProcess.cs b/src/executeProcess.cs
index 3404374..6076eaf 100644
--- a/src/executeProcess.cs
+++ b/src/executeProcess.cs
@@ -110,8 +110,8 @@ class ExecuteProcess
                        return new Result ("", "", Result.ERROR_CANT_START, errorMessage);
                }
 
-               string stdout = process.StandardOutput.ReadToEnd();
-               string stderr = process.StandardError.ReadToEnd();
+               string stdout = process.StandardOutput.ReadToEnd().TrimEnd ('\n');
+               string stderr = process.StandardError.ReadToEnd ().TrimEnd ('\n');
 
                process.WaitForExit ();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]