Skip to content

Instantly share code, notes, and snippets.

@dizzyd
Created November 5, 2012 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dizzyd/6f19f254f7360bd4c9c9 to your computer and use it in GitHub Desktop.
Save dizzyd/6f19f254f7360bd4c9c9 to your computer and use it in GitHub Desktop.
diff --git a/src/rebar.erl b/src/rebar.erl
index cd0bed5..0de24b8 100644
--- a/src/rebar.erl
+++ b/src/rebar.erl
@@ -52,6 +52,7 @@
%% Public API
%% ====================================================================
+%% escript Entry point
main(Args) ->
case catch(run(Args)) of
ok ->
@@ -65,6 +66,11 @@ main(Args) ->
rebar_utils:delayed_halt(1)
end.
+%% Erlang-API entry point
+run(BaseConfig, Commands) ->
+ application:load(rebar),
+ run_aux(BaseConfig, Commands).
+
%% ====================================================================
%% Internal functions
%% ====================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment