diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-08-06 19:32:57 -0500 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-08-06 19:32:57 -0500 |
commit | 1001eefc2b0f0979c1a07fc309625ee04df60910 (patch) | |
tree | 6ab49c41b3fcc791d4598b7356ac62369ddb962e /src/rebar_prv_shell.erl | |
parent | 1a061b9c9a27c46b079caf2fa80aaf5d541823b8 (diff) | |
parent | 28a3f9849b763113dc7425040faf5e18ab703069 (diff) |
Merge pull request #691 from ferd/detect-missing-epmd
Detect missing EPMD, error, fallback and advise.
Diffstat (limited to 'src/rebar_prv_shell.erl')
-rw-r--r-- | src/rebar_prv_shell.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rebar_prv_shell.erl b/src/rebar_prv_shell.erl index 3c6369a..431b3e2 100644 --- a/src/rebar_prv_shell.erl +++ b/src/rebar_prv_shell.erl @@ -157,13 +157,19 @@ setup_name(State) -> {undefined, undefined} -> ok; {Name, undefined} -> - net_kernel:start([Name, longnames]); + check_epmd(net_kernel:start([Name, longnames])); {undefined, SName} -> - net_kernel:start([SName, shortnames]); + check_epmd(net_kernel:start([SName, shortnames])); {_, _} -> ?ABORT("Cannot have both short and long node names defined", []) end. +check_epmd({error,{{shutdown, {_,net_kernel,{'EXIT',nodistribution}}},_}}) -> + ?ERROR("Erlang Distribution failed, falling back to nonode@nohost. " + "Verify that epmd is running and try again.",[]); +check_epmd(_) -> + ok. + find_apps_to_boot(State) -> %% Try the shell_apps option case rebar_state:get(State, shell_apps, undefined) of |