Permalink
Browse files

ssh: If not valid expression, rather than generate a error, try to us…

…e the cmd.
  • Loading branch information...
1 parent b269e15 commit 6dd7f8b06500110b4aeed660c674af6738ef709d @gustehn gustehn committed Mar 27, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/ssh/src/ssh_cli.erl
View
@@ -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).

0 comments on commit 6dd7f8b

Please sign in to comment.