From 6dd7f8b06500110b4aeed660c674af6738ef709d Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Wed, 27 Mar 2013 17:21:27 +0100 Subject: ssh: If not valid expression, rather than generate a error, try to use the cmd. --- lib/ssh/src/ssh_cli.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ssh/src/ssh_cli.erl b/lib/ssh/src/ssh_cli.erl index 7232cc482c..0531ad7830 100644 --- a/lib/ssh/src/ssh_cli.erl +++ b/lib/ssh/src/ssh_cli.erl @@ -189,7 +189,12 @@ terminate(_Reason, _State) -> %%-------------------------------------------------------------------- exec(Cmd) -> - eval(parse(scan(Cmd))). + case eval(parse(scan(Cmd))) of + {error, _} -> + {Cmd, 0}; %% This should be an external call + Term -> + Term + end. scan(Cmd) -> erl_scan:string(Cmd). -- cgit v1.2.3