fix
This commit is contained in:
parent
7214a9d160
commit
dab42088f2
@ -49,9 +49,12 @@ startup(#manifest{work_dir = WorkDir, exec = ExecCmd0, args = Args0}) ->
|
|||||||
],
|
],
|
||||||
ExecCmd = binary_to_list(ExecCmd0),
|
ExecCmd = binary_to_list(ExecCmd0),
|
||||||
RealExecCmd = filename:absname_join(WorkDir, ExecCmd),
|
RealExecCmd = filename:absname_join(WorkDir, ExecCmd),
|
||||||
|
case catch erlang:open_port({spawn_executable, RealExecCmd}, PortSettings) of
|
||||||
Port = erlang:open_port({spawn_executable, RealExecCmd}, PortSettings),
|
Port when is_port(Port) ->
|
||||||
{ok, Port}.
|
{ok, Port};
|
||||||
|
_Other ->
|
||||||
|
{error, <<"exec command startup failed">>}
|
||||||
|
end.
|
||||||
|
|
||||||
%% 检查配置是否合法
|
%% 检查配置是否合法
|
||||||
-spec check_manifest(Manifest :: map()) -> {ok, #manifest{}} | {error, Reason :: binary()}.
|
-spec check_manifest(Manifest :: map()) -> {ok, #manifest{}} | {error, Reason :: binary()}.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user