summaryrefslogtreecommitdiff
path: root/src/rebar_prv_escriptize.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_prv_escriptize.erl')
-rw-r--r--src/rebar_prv_escriptize.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl
index 03332a0..3cdc9bf 100644
--- a/src/rebar_prv_escriptize.erl
+++ b/src/rebar_prv_escriptize.erl
@@ -47,7 +47,7 @@ init(State) ->
Provider = providers:create([
{name, ?PROVIDER},
{module, ?MODULE},
- {bare, false},
+ {bare, true},
{deps, ?DEPS},
{example, "rebar3 escriptize"},
{opts, []},
@@ -72,7 +72,7 @@ do(State) ->
end;
Name ->
AllApps = rebar_state:all_deps(State)++rebar_state:project_apps(State),
- AppInfo = rebar_app_utils:find(Name, AllApps),
+ {ok, AppInfo} = rebar_app_utils:find(ec_cnv:to_binary(Name), AllApps),
escriptize(State, AppInfo)
end.
@@ -83,14 +83,15 @@ escriptize(State0, App) ->
%% Get the output filename for the escript -- this may include dirs
Filename = filename:join([rebar_dir:base_dir(State0), "bin",
rebar_state:get(State0, escript_name, AppName)]),
+ ?DEBUG("Creating escript file ~s", [Filename]),
ok = filelib:ensure_dir(Filename),
State = rebar_state:escript_path(State0, Filename),
%% Look for a list of other applications (dependencies) to include
%% in the output file. We then use the .app files for each of these
%% to pull in all the .beam files.
- InclApps = lists:usort(rebar_state:get(State, escript_incl_apps, [])
- ++ all_deps(State)),
+ InclApps = lists:usort([ec_cnv:to_atom(AppName) | rebar_state:get(State, escript_incl_apps, [])
+ ++ all_deps(State)]),
AllApps = rebar_state:all_deps(State)++rebar_state:project_apps(State),
InclBeams = get_apps_beams(InclApps, AllApps),
@@ -134,7 +135,7 @@ format_error({bad_name, App}) ->
io_lib:format("Failed to get ebin/ directory for "
"escript_incl_app: ~p", [App]);
format_error(no_main_app) ->
- io_lib:format("Multiple project apps and {rebar_escript_plugin, [{main_app, atom()}]}."
+ io_lib:format("Multiple project apps and {escript_main_app, atom()}."
" not set in rebar.config", []).
%% ===================================================================