Fix incorrect "not an app dir" warning

This commit is contained in:
Tuncer Ayaz 2015-01-23 10:55:38 +01:00
parent b488179030
commit 59d1d0c34d

View file

@ -457,8 +457,19 @@ is_app_available(Config, App, VsnRegex, Path, _IsRaw = false) ->
{AppFile, {expected, App}, {has, OtherApp}}}}} {AppFile, {expected, App}, {has, OtherApp}}}}}
end; end;
false -> false ->
?WARN("Expected ~s to be an app dir (containing ebin/*.app), " case filelib:is_dir(Path) of
"but no .app found.\n", [Path]), true ->
%% Path is a directory, but it's not an app dir.
?WARN("Directory expected to be an app dir, but no "
"app file found ~n"
"in ebin/ or src/:~n~s~n",
[Path]);
false ->
%% Path is not a directory, so it cannot be an app dir.
%% TODO: maybe we can avoid checking non-existing dirs
?DEBUG("Directory expected to be an app dir, "
"but it doesn't exist (yet?):~n~s~n", [Path])
end,
{Config, {false, {missing_app_file, Path}}} {Config, {false, {missing_app_file, Path}}}
end; end;
is_app_available(Config, App, _VsnRegex, Path, _IsRaw = true) -> is_app_available(Config, App, _VsnRegex, Path, _IsRaw = true) ->