summaryrefslogtreecommitdiff
path: root/src/rebar_core.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_core.erl')
-rw-r--r--src/rebar_core.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 1cefe84..7cf0c7a 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -64,6 +64,11 @@ run(RawArgs) ->
%% Convert command strings to atoms
CommandAtoms = [list_to_atom(C) || C <- Commands],
+ %% Determine the location of the rebar executable; important for pulling
+ %% resources out of the escript
+ rebar_config:set_global(escript, filename:absname(escript:script_name())),
+ ?DEBUG("Rebar location: ~p\n", [rebar_config:get_global(escript, undefined)]),
+
%% Load rebar.config, if it exists
process_dir(rebar_utils:get_cwd(), rebar_config:new(), CommandAtoms).