diff options
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). |