diff options
author | Fredrik Gustafsson <[email protected]> | 2013-04-08 12:18:06 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-04-08 12:18:06 +0200 |
commit | 9df891dd3ef0304697d63aecb749709b9f57c2bc (patch) | |
tree | b3ffa8e8e039ca9e1d0297fb18be47fd8f361243 /lib | |
parent | e4ee152324697864dc5b41c9a66b73b54bcde73d (diff) | |
parent | 6dd7f8b06500110b4aeed660c674af6738ef709d (diff) | |
download | otp-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.erl | 7 |
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). |