-
-
Save dizzyd/6f19f254f7360bd4c9c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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