aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-04-08 12:18:06 +0200
committerFredrik Gustafsson <[email protected]>2013-04-08 12:18:06 +0200
commit9df891dd3ef0304697d63aecb749709b9f57c2bc (patch)
treeb3ffa8e8e039ca9e1d0297fb18be47fd8f361243 /lib
parente4ee152324697864dc5b41c9a66b73b54bcde73d (diff)
parent6dd7f8b06500110b4aeed660c674af6738ef709d (diff)
downloadotp-9df891dd3ef0304697d63aecb749709b9f57c2bc.tar.gz
otp-9df891dd3ef0304697d63aecb749709b9f57c2bc.tar.bz2
otp-9df891dd3ef0304697d63aecb749709b9f57c2bc.zip
Merge branch 'fredrik/ssh/ssh_daemon_pass_arg/OTP-10975' into maint
* fredrik/ssh/ssh_daemon_pass_arg/OTP-10975: ssh: If not valid expression, rather than generate a error, try to use the cmd.
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh/src/ssh_cli.erl7
1 files changed, 6 insertions, 1 deletions
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).