mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 11:09:55 +00:00
Fix whitespace errors
This commit is contained in:
parent
65b0f917b8
commit
6127f528b9
5 changed files with 36 additions and 28 deletions
|
@ -295,14 +295,19 @@ collect_glob(Config, Cwd, Glob) ->
|
||||||
{true, Deps} = rebar_deps:get_deps_dir(Config),
|
{true, Deps} = rebar_deps:get_deps_dir(Config),
|
||||||
DepsDir = filename:basename(Deps),
|
DepsDir = filename:basename(Deps),
|
||||||
CwdParts = filename:split(Cwd),
|
CwdParts = filename:split(Cwd),
|
||||||
filelib:fold_files(Cwd, Glob, true, fun(F, Acc) ->
|
filelib:fold_files(
|
||||||
|
Cwd,
|
||||||
|
Glob,
|
||||||
|
true,
|
||||||
|
fun(F, Acc) ->
|
||||||
%% Ignore any specs under the deps/ directory. Do this pulling
|
%% Ignore any specs under the deps/ directory. Do this pulling
|
||||||
%% the dirname off the F and then splitting it into a list.
|
%% the dirname off the F and then splitting it into a list.
|
||||||
Parts = filename:split(filename:dirname(F)),
|
Parts = filename:split(filename:dirname(F)),
|
||||||
Parts2 = remove_common_prefix(Parts, CwdParts),
|
Parts2 = remove_common_prefix(Parts, CwdParts),
|
||||||
case lists:member(DepsDir, Parts2) of
|
case lists:member(DepsDir, Parts2) of
|
||||||
true ->
|
true ->
|
||||||
Acc; % There is a directory named "deps" in path
|
%% There is a directory named "deps" in path
|
||||||
|
Acc;
|
||||||
false ->
|
false ->
|
||||||
[F | Acc] % No "deps" directory in path
|
[F | Acc] % No "deps" directory in path
|
||||||
end
|
end
|
||||||
|
|
|
@ -74,7 +74,8 @@ preprocess(SourceFile, TargetFile, _Config) ->
|
||||||
%% http://erlang.org/doc/man/appup.html.
|
%% http://erlang.org/doc/man/appup.html.
|
||||||
{ok, [{_Vsn, UpFromVsn, DownToVsn} = AppUp]}
|
{ok, [{_Vsn, UpFromVsn, DownToVsn} = AppUp]}
|
||||||
when is_list(UpFromVsn), is_list(DownToVsn) ->
|
when is_list(UpFromVsn), is_list(DownToVsn) ->
|
||||||
case file:write_file(TargetFile,
|
case file:write_file(
|
||||||
|
TargetFile,
|
||||||
lists:flatten(io_lib:format("~p.", [AppUp]))) of
|
lists:flatten(io_lib:format("~p.", [AppUp]))) of
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
?ABORT("Failed writing to target file ~s due to ~s",
|
?ABORT("Failed writing to target file ~s due to ~s",
|
||||||
|
|
|
@ -196,7 +196,8 @@ process_overlay(Config, ReltoolConfig) ->
|
||||||
%% providing an additional file on the command-line.
|
%% providing an additional file on the command-line.
|
||||||
%%
|
%%
|
||||||
overlay_vars(Config, Vars0, ReltoolConfig) ->
|
overlay_vars(Config, Vars0, ReltoolConfig) ->
|
||||||
BaseVars = load_vars_file([proplists:get_value(overlay_vars, ReltoolConfig)]),
|
BaseVars = load_vars_file(
|
||||||
|
[proplists:get_value(overlay_vars, ReltoolConfig)]),
|
||||||
OverlayVars = rebar_config:get_global(Config, overlay_vars, []),
|
OverlayVars = rebar_config:get_global(Config, overlay_vars, []),
|
||||||
OverrideVars = load_vars_file(string:tokens(OverlayVars, ",")),
|
OverrideVars = load_vars_file(string:tokens(OverlayVars, ",")),
|
||||||
M = fun merge_overlay_var/3,
|
M = fun merge_overlay_var/3,
|
||||||
|
@ -327,7 +328,8 @@ overlay_files(ReltoolConfig) ->
|
||||||
{overlay, Overlay} when is_list(Overlay) ->
|
{overlay, Overlay} when is_list(Overlay) ->
|
||||||
Overlay;
|
Overlay;
|
||||||
false ->
|
false ->
|
||||||
?INFO("No {overlay, [...]} found in reltool.config.\n", []),
|
?INFO("No {overlay, [...]} found in reltool.config.\n",
|
||||||
|
[]),
|
||||||
[];
|
[];
|
||||||
_ ->
|
_ ->
|
||||||
?ABORT("{overlay, [...]} entry in reltool.config "
|
?ABORT("{overlay, [...]} entry in reltool.config "
|
||||||
|
|
Loading…
Reference in a new issue