aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2022-04-26 13:19:13 +0200
committerLoïc Hoguin <[email protected]>2022-04-26 13:19:13 +0200
commit8a5c11e530d3bd50ead86a427d3da3caa476d356 (patch)
treec8aaf54de51bb80cbe142272c71ae4fb3f760c50 /core
parentaa0053cc593a70630db1f893707cfbb1ae6934b9 (diff)
downloaderlang.mk-3f4e72eb82092b0f6a0dd96c9b5563648107a15c.tar.gz
erlang.mk-3f4e72eb82092b0f6a0dd96c9b5563648107a15c.tar.bz2
erlang.mk-3f4e72eb82092b0f6a0dd96c9b5563648107a15c.zip
Fix .app.src.script autopatch when no .app.src is present2022.04.26
Thanks Luke Bakken for the report!
Diffstat (limited to 'core')
-rw-r--r--core/deps.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/deps.mk b/core/deps.mk
index afe3f52..6ca0ccc 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -649,9 +649,12 @@ endef
define dep_autopatch_appsrc_script.erl
AppSrc = "$(call core_native_path,$(DEPS_DIR)/$1/src/$1.app.src)",
AppSrcScript = AppSrc ++ ".script",
- {ok, Conf0} = file:consult(AppSrc),
+ Conf1 = case file:consult(AppSrc) of
+ {ok, Conf0} -> Conf0;
+ {error, enoent} -> []
+ end,
Bindings0 = erl_eval:new_bindings(),
- Bindings1 = erl_eval:add_binding('CONFIG', Conf0, Bindings0),
+ Bindings1 = erl_eval:add_binding('CONFIG', Conf1, Bindings0),
Bindings = erl_eval:add_binding('SCRIPT', AppSrcScript, Bindings1),
Conf = case file:script(AppSrcScript, Bindings) of
{ok, [C]} -> C;