chore: add more info in error message

This commit is contained in:
Zaiming Shi 2021-06-23 13:35:49 +02:00 committed by Rory Z
parent 98c4fff43f
commit f17962e79a
1 changed files with 2 additions and 3 deletions

View File

@ -23,7 +23,6 @@ usage() ->
"Usage: " ++ escript:script_name() ++ " emqx|emqx-edge".
-type app() :: atom().
-type deps_overlay() :: {re, string()} | app().
base_deps() ->
%% make sure emqx_dashboard depends on all other emqx_xxx apps
@ -80,8 +79,8 @@ list_apps(LibDir) ->
is_app(_LibDir, "." ++ _) -> false; %% ignore hidden dir
is_app(LibDir, AppName) ->
filelib:is_regular(filename:join([ebin_dir(LibDir, AppName), AppName ++ ".app"])) orelse
error({unknown_app, AppName}). %% wtf
Path = filename:join([ebin_dir(LibDir, AppName), AppName ++ ".app"]),
filelib:is_regular(Path) orelse error({unknown_app, AppName, Path}). %% wtf
lib_dir(Profile) ->
filename:join(["_build", Profile, lib]).