Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/clovershell-client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-03-11 22:50:03 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-03-11 22:50:03 +0300
commit110a1ec7d882bd43454fd178156d4d6812813849 (patch)
tree544d6323149dd3ca50a9fe0eaa74845831600881 /CloverShell
parent82ba762f9466e04da3aa8173112449f69465dea2 (diff)
push/pull progress
Diffstat (limited to 'CloverShell')
-rw-r--r--CloverShell/ClovershellConnection.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/CloverShell/ClovershellConnection.cs b/CloverShell/ClovershellConnection.cs
index eeaddc6..d212420 100644
--- a/CloverShell/ClovershellConnection.cs
+++ b/CloverShell/ClovershellConnection.cs
@@ -595,16 +595,13 @@ namespace com.clusterrr.clovershell
if (timeout > 0 && IdleTime.TotalMilliseconds > timeout)
throw new Exception("clovershell read timeout");
}
-
if (throwOnNonZero && c.result != 0)
{
string errText = "";
if (stderr is MemoryStream)
{
stderr.Seek(0, SeekOrigin.Begin);
- var buff = new byte[stderr.Length];
- stderr.Read(buff, 0, buff.Length);
- errText = ": " + Encoding.UTF8.GetString(buff);
+ errText = ": " + new StreamReader(stderr).ReadToEnd();
}
throw new Exception(string.Format("shell command \"{0}\" returned exit code {1}{2}", command, c.result, errText));
}