summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2016-05-09 09:42:54 -0400
committerFred Hebert <mononcqc@ferd.ca>2016-05-09 09:42:54 -0400
commit5ccaaa8da2c0511062398c99b56713ffc217be73 (patch)
treebea7f55952518374f780f8cf407aff408b502745
parentc9cc58d2b885249da3ad7f738f922a83bfb302d1 (diff)
parent66aa49c1862f2c1ec75d6e25968384fea7549a71 (diff)
Merge pull request #1178 from kalta/fix-shell-startup
Fix shell node startup
-rw-r--r--src/rebar_prv_shell.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rebar_prv_shell.erl b/src/rebar_prv_shell.erl
index 0ede495..a5457ad 100644
--- a/src/rebar_prv_shell.erl
+++ b/src/rebar_prv_shell.erl
@@ -108,6 +108,10 @@ shell(State) ->
simulate_proc_lib(),
true = register(rebar_agent, self()),
{ok, GenState} = rebar_agent:init(State),
+ %% Hack to fool the init process into thinking we have stopped and the normal
+ %% node start process can go on. Without it, init:get_status() always return
+ %% '{starting, started}' instead of '{started, started}'
+ init ! {'EXIT', self(), normal},
gen_server:enter_loop(rebar_agent, [], GenState, {local, rebar_agent}, hibernate).
info() ->