aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-04-08 12:18:39 +0200
committerFredrik Gustafsson <[email protected]>2013-04-08 12:18:39 +0200
commit0804e1eefdab7113b4168c370ecad934f42d3587 (patch)
treebc40751f35df8d0ffa493f26bc0ef78e7db91638
parenta3c89f5394ffc451d58fbef70d576f71427bf2e3 (diff)
parent9df891dd3ef0304697d63aecb749709b9f57c2bc (diff)
downloadotp-0804e1eefdab7113b4168c370ecad934f42d3587.tar.gz
otp-0804e1eefdab7113b4168c370ecad934f42d3587.tar.bz2
otp-0804e1eefdab7113b4168c370ecad934f42d3587.zip
Merge branch 'maint'
-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).