diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-09-16 19:36:04 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-09-16 19:36:04 -0500 |
commit | 884d298291e64fad99f096ee82018b568e0985f2 (patch) | |
tree | 2251d30abe9bf5890d2fd7506e74979149307df4 /src/rebar.erl | |
parent | 71d9500997930a43f30bce863e05f3dbaa4fd3f4 (diff) |
update templating
Diffstat (limited to 'src/rebar.erl')
-rw-r--r-- | src/rebar.erl | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/rebar.erl b/src/rebar.erl index 3560772..8ad61cc 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -156,12 +156,8 @@ init_config({Options, _NonOptArgs}) -> init_config1(BaseConfig) -> %% Determine the location of the rebar executable; important for pulling %% resources out of the escript - %ScriptName = filename:absname(escript:script_name()), - %BaseConfig1 = rebar_state:set(BaseConfig, escript, ScriptName), - %?DEBUG("Rebar location: ~p\n", [ScriptName]), - %% Note the top-level directory for reference - AbsCwd = filename:absname(rebar_utils:get_cwd()), - rebar_state:set(BaseConfig, base_dir, AbsCwd). + ScriptName = filename:absname(escript:script_name()), + rebar_state:set(BaseConfig, escript, ScriptName). run_aux(BaseConfig, Commands) -> %% Make sure crypto is running @@ -176,13 +172,13 @@ run_aux(BaseConfig, Commands) -> [Command | Args] = Commands, CommandAtom = list_to_atom(Command), - %BaseConfig1 = init_config1(BaseConfig), + BaseConfig1 = init_config1(BaseConfig), %% Process each command, resetting any state between each one - BaseConfig1 = rebar_state:set(BaseConfig, base_dir, filename:absname(rebar_state:dir(BaseConfig))), + BaseConfig2 = rebar_state:set(BaseConfig1, base_dir, filename:absname(rebar_state:dir(BaseConfig1))), {ok, Providers} = application:get_env(rebar, providers), - BaseConfig2 = rebar_state:create_logic_providers(Providers, BaseConfig1), - rebar_core:process_command(rebar_state:command_args(BaseConfig2, Args), CommandAtom), + BaseConfig3 = rebar_state:create_logic_providers(Providers, BaseConfig2), + rebar_core:process_command(rebar_state:command_args(BaseConfig3, Args), CommandAtom), ok. %% |