aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2014-04-07 10:44:48 +0200
committerJosé Valim <[email protected]>2014-04-29 22:28:32 +0200
commit4525bc59822acf0dfffa1edc64125c180d29e59e (patch)
tree548406895808db89c2f0f0c89233b963c01ef9b8
parent8acc644e162bad52f7ab81c76c0cad15628e4f3d (diff)
downloadotp-4525bc59822acf0dfffa1edc64125c180d29e59e.tar.gz
otp-4525bc59822acf0dfffa1edc64125c180d29e59e.tar.bz2
otp-4525bc59822acf0dfffa1edc64125c180d29e59e.zip
Support binary standard_input in ssh_io
-rw-r--r--lib/ssh/src/ssh_io.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh_io.erl b/lib/ssh/src/ssh_io.erl
index 832b144db9..35336bce8b 100644
--- a/lib/ssh/src/ssh_io.erl
+++ b/lib/ssh/src/ssh_io.erl
@@ -81,6 +81,8 @@ format(Fmt, Args) ->
trim(Line) when is_list(Line) ->
lists:reverse(trim1(lists:reverse(trim1(Line))));
+trim(Line) when is_binary(Line) ->
+ trim(unicode:characters_to_list(Line));
trim(Other) -> Other.
trim1([$\s|Cs]) -> trim(Cs);