Make ZX recognize rundir and runlocal for log path generation

This commit is contained in:
Craig Everett 2020-01-02 02:13:19 +09:00
parent ae135a0002
commit 381987475a

View File

@ -359,6 +359,12 @@ start() ->
{ok, PackageID} -> zx_lib:new_logpath(PackageID);
Error -> done(Error)
end;
["rundir", Path | _] ->
{ok, #{package_id = PackageID}} = zx_lib:read_project_meta(Path),
zx_lib:new_logpath(PackageID);
["runlocal" | _] ->
{ok, #{package_id = PackageID}} = zx_lib:read_project_meta(),
zx_lib:new_logpath(PackageID);
_ ->
{ok, Version} = zx_lib:string_to_version(os:getenv("ZX_VERSION")),
zx_lib:new_logpath({"otpr", "zx", Version})