This commit is contained in:
anlicheng 2025-05-05 23:27:17 +08:00
parent 7214a9d160
commit dab42088f2

View File

@ -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()}.