mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Fix badarg crashes on missing dependency errors
This commit is contained in:
parent
9d5557b16f
commit
2c37270f52
4 changed files with 15 additions and 17 deletions
|
@ -85,12 +85,12 @@ compile_abnfc(Source, _Target, Config) ->
|
||||||
case abnfc_is_present() of
|
case abnfc_is_present() of
|
||||||
false ->
|
false ->
|
||||||
?ERROR(
|
?ERROR(
|
||||||
<<"~n===============================================~n"
|
"~n===============================================~n"
|
||||||
" You need to install abnfc to compile ABNF grammars~n"
|
" You need to install abnfc to compile ABNF grammars~n"
|
||||||
" Download the latest tarball release from github~n"
|
" Download the latest tarball release from github~n"
|
||||||
" https://github.com/nygge/abnfc~n"
|
" https://github.com/nygge/abnfc~n"
|
||||||
" and install it into your erlang library dir~n"
|
" and install it into your erlang library dir~n"
|
||||||
"===============================================~n~n">>, []),
|
"===============================================~n~n", []),
|
||||||
?FAIL;
|
?FAIL;
|
||||||
true ->
|
true ->
|
||||||
AbnfcOpts = abnfc_opts(Config),
|
AbnfcOpts = abnfc_opts(Config),
|
||||||
|
|
|
@ -114,12 +114,12 @@ compile_dtl(Source, Target, Config) ->
|
||||||
case code:which(erlydtl) of
|
case code:which(erlydtl) of
|
||||||
non_existing ->
|
non_existing ->
|
||||||
?ERROR(
|
?ERROR(
|
||||||
<<"~n===============================================~n"
|
"~n===============================================~n"
|
||||||
" You need to install erlydtl to compile DTL templates~n"
|
" You need to install erlydtl to compile DTL templates~n"
|
||||||
" Download the latest tarball release from github~n"
|
" Download the latest tarball release from github~n"
|
||||||
" http://code.google.com/p/erlydtl/~n"
|
" http://code.google.com/p/erlydtl/~n"
|
||||||
" and install it into your erlang library dir~n"
|
" and install it into your erlang library dir~n"
|
||||||
"===============================================~n~n">>, []),
|
"===============================================~n~n", []),
|
||||||
?FAIL;
|
?FAIL;
|
||||||
_ ->
|
_ ->
|
||||||
case needs_compile(Source, Target, Config) of
|
case needs_compile(Source, Target, Config) of
|
||||||
|
|
|
@ -48,8 +48,7 @@ compile(Config, _AppFile) ->
|
||||||
compile_lfe(Source, _Target, Config) ->
|
compile_lfe(Source, _Target, Config) ->
|
||||||
case code:which(lfe_comp) of
|
case code:which(lfe_comp) of
|
||||||
non_existing ->
|
non_existing ->
|
||||||
?ERROR(<<
|
?ERROR("~n"
|
||||||
"~n"
|
|
||||||
"*** MISSING LFE COMPILER ***~n"
|
"*** MISSING LFE COMPILER ***~n"
|
||||||
" You must do one of the following:~n"
|
" You must do one of the following:~n"
|
||||||
" a) Install LFE globally in your erl libs~n"
|
" a) Install LFE globally in your erl libs~n"
|
||||||
|
@ -57,8 +56,7 @@ compile_lfe(Source, _Target, Config) ->
|
||||||
" {lfe, \"0.6.1\",~n"
|
" {lfe, \"0.6.1\",~n"
|
||||||
" {git, \"git://github.com/rvirding/lfe\",~n"
|
" {git, \"git://github.com/rvirding/lfe\",~n"
|
||||||
" {tag, \"v0.6.1\"}}}~n"
|
" {tag, \"v0.6.1\"}}}~n"
|
||||||
"~n"
|
"~n", []),
|
||||||
>>, []),
|
|
||||||
?FAIL;
|
?FAIL;
|
||||||
_ ->
|
_ ->
|
||||||
Opts = [{i, "include"}, {outdir, "ebin"}, report]
|
Opts = [{i, "include"}, {outdir, "ebin"}, report]
|
||||||
|
|
|
@ -75,12 +75,12 @@ compile_neo(Source, Target, Config) ->
|
||||||
case code:which(neotoma) of
|
case code:which(neotoma) of
|
||||||
non_existing ->
|
non_existing ->
|
||||||
?ERROR(
|
?ERROR(
|
||||||
<<"~n===============================================~n"
|
"~n===============================================~n"
|
||||||
" You need to install neotoma to compile PEG grammars~n"
|
" You need to install neotoma to compile PEG grammars~n"
|
||||||
" Download the latest tarball release from github~n"
|
" Download the latest tarball release from github~n"
|
||||||
" https://github.com/seancribbs/neotoma~n"
|
" https://github.com/seancribbs/neotoma~n"
|
||||||
" and install it into your erlang library dir~n"
|
" and install it into your erlang library dir~n"
|
||||||
"===============================================~n~n">>, []),
|
"===============================================~n~n", []),
|
||||||
?FAIL;
|
?FAIL;
|
||||||
_ ->
|
_ ->
|
||||||
case needs_compile(Source, Target, Config) of
|
case needs_compile(Source, Target, Config) of
|
||||||
|
|
Loading…
Reference in a new issue