diff --git a/src/couchdb/couch_external_server.erl b/src/couchdb/couch_external_server.erl index 045fcee..e1db2b2 100644 --- a/src/couchdb/couch_external_server.erl +++ b/src/couchdb/couch_external_server.erl @@ -48,7 +48,13 @@ terminate(_Reason, {_Name, _Command, Pid}) -> ok. handle_call({execute, JsonReq}, _From, {Name, Command, Pid}) -> - {reply, couch_os_process:prompt(Pid, JsonReq), {Name, Command, Pid}}. + Reply = case couch_os_process:prompt(Pid, JsonReq) of + {json, Json} -> + ?JSON_DECODE(Json); + Else -> + Else + end, + {reply, Reply, {Name, Command, Pid}}. handle_info({'EXIT', _Pid, normal}, State) -> {noreply, State};