aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bulfone <[email protected]>2018-02-28 23:02:31 +0100
committerLoïc Hoguin <[email protected]>2018-03-01 10:51:38 +0100
commit571e92d568ce623701e5d53243c28572388fc538 (patch)
tree24561e2e0a953e315f184e2f7383a5d5222aaa8d
parent75e9daadf23cb36ab5cd077e32bfb4f1b7488bef (diff)
downloaderlang.mk-571e92d568ce623701e5d53243c28572388fc538.tar.gz
erlang.mk-571e92d568ce623701e5d53243c28572388fc538.tar.bz2
erlang.mk-571e92d568ce623701e5d53243c28572388fc538.zip
.app.src.script files may return app specification directly
(i.e. not wrapped inside a list - rebar3 allows this as well)
-rw-r--r--core/deps.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/deps.mk b/core/deps.mk
index 1ffae2a..0b17ea9 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -480,7 +480,10 @@ define dep_autopatch_appsrc_script.erl
Bindings0 = erl_eval:new_bindings(),
Bindings1 = erl_eval:add_binding('CONFIG', Conf0, Bindings0),
Bindings = erl_eval:add_binding('SCRIPT', AppSrcScript, Bindings1),
- {ok, [Conf]} = file:script(AppSrcScript, Bindings),
+ Conf = case file:script(AppSrcScript, Bindings) of
+ {ok, [C]} -> C;
+ {ok, C} -> C
+ end,
ok = file:write_file(AppSrc, io_lib:format("~p.~n", [Conf])),
halt()
endef