From d317dcc9a673c6928ca61efc8e34fe2618b90215 Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Tue, 10 Apr 2018 14:07:25 +0300 Subject: Some fixes --- Clovershell/ClovershellConnection.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Clovershell') diff --git a/Clovershell/ClovershellConnection.cs b/Clovershell/ClovershellConnection.cs index ec136b95..aafe3a37 100644 --- a/Clovershell/ClovershellConnection.cs +++ b/Clovershell/ClovershellConnection.cs @@ -636,7 +636,10 @@ namespace com.clusterrr.clovershell var stdOut = new MemoryStream(); Execute(command, null, stdOut, null, timeout, throwOnNonZero); var buff = stdOut.ToArray(); - return Encoding.UTF8.GetString(buff).Trim(); +#if VERY_DEBUG + Debug.WriteLine($"Output for {command}: {Encoding.UTF8.GetString(buff)}"); +#endif + return Encoding.UTF8.GetString(buff).Trim(new char[] { ' ', '\t', '\r', '\n' }); } public int Execute(string command, Stream stdin = null, Stream stdout = null, Stream stderr = null, int timeout = 0, bool throwOnNonZero = false) -- cgit v1.2.3