summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar.app.src2
-rw-r--r--src/rebar_erlc_compiler.erl21
-rw-r--r--src/rebar_prv_local_install.erl8
3 files changed, 22 insertions, 9 deletions
diff --git a/src/rebar.app.src b/src/rebar.app.src
index 5c76f59..c96f65c 100644
--- a/src/rebar.app.src
+++ b/src/rebar.app.src
@@ -3,7 +3,7 @@
{application, rebar,
[{description, "Rebar: Erlang Build Tool"},
- {vsn, "3.6.0"},
+ {vsn, "git"},
{modules, []},
{registered, []},
{applications, [kernel,
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index ebdd9dd..920c3b4 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -799,8 +799,27 @@ dir_recursive(Opts, Dir, CompileOpts) when is_list(CompileOpts) ->
end.
valid_erl_first_conf(FileList) ->
- case rebar_utils:is_list_of_strings(FileList) of
+ Strs = filter_file_list(FileList),
+ case rebar_utils:is_list_of_strings(Strs) of
true -> true;
false -> ?ABORT("An invalid file list (~p) was provided as part of your erl_files_first directive",
[FileList])
end.
+
+filter_file_list(FileList) ->
+ Atoms = lists:filter( fun(X) -> is_atom(X) end, FileList),
+ case Atoms of
+ [] ->
+ FileList;
+ _ ->
+ atoms_in_erl_first_files_warning(Atoms),
+ lists:filter( fun(X) -> not(is_atom(X)) end, FileList)
+ end.
+
+atoms_in_erl_first_files_warning(Atoms) ->
+ W = "You have provided atoms as file entries in erl_first_files; "
+ "erl_first_files only expects lists of filenames as strings. "
+ "The following modules (~p) may not work as expected and it is advised "
+ "that you change these entires to string format "
+ "(e.g., \"src/module.erl\") ",
+ ?WARN(W, [Atoms]).
diff --git a/src/rebar_prv_local_install.erl b/src/rebar_prv_local_install.erl
index c41812f..cd6a204 100644
--- a/src/rebar_prv_local_install.erl
+++ b/src/rebar_prv_local_install.erl
@@ -89,15 +89,9 @@ extract_escript(State, ScriptPath) ->
BinFile = filename:join(BinDir, "rebar3"),
filelib:ensure_dir(BinFile),
- {ok, #file_info{mode = _,
- uid = Uid,
- gid = Gid}} = file:read_file_info(ScriptPath),
-
?INFO("Writing rebar3 run script ~ts...", [BinFile]),
file:write_file(BinFile, bin_contents(OutputDir)),
- ok = file:write_file_info(BinFile, #file_info{mode=33277,
- uid=Uid,
- gid=Gid}),
+ ok = file:write_file_info(BinFile, #file_info{mode=33277}),
?INFO("Add to $PATH for use: export PATH=~ts:$PATH", [BinDir]),