diff options
author | Fredrik Gustafsson <[email protected]> | 2013-03-27 17:21:27 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-04-05 12:29:19 +0200 |
commit | 6dd7f8b06500110b4aeed660c674af6738ef709d (patch) | |
tree | 2aee5c51e617fdaea52e835a92fa47d781c30003 /lib/ssh/src/ssh_cli.erl | |
parent | b269e15eea9232205a371d6b10c50628d836b661 (diff) | |
download | otp-6dd7f8b06500110b4aeed660c674af6738ef709d.tar.gz otp-6dd7f8b06500110b4aeed660c674af6738ef709d.tar.bz2 otp-6dd7f8b06500110b4aeed660c674af6738ef709d.zip |
ssh: If not valid expression, rather than generate a error, try to use the cmd.
Diffstat (limited to 'lib/ssh/src/ssh_cli.erl')
-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). |