Skip to content

Commit 4273746

Browse files
authored
Merge pull request #90 from rabbitmq/app-src-fix
Preserve applications in .app.src files unless overridden
2 parents 393719b + 16933a6 commit 4273746

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

private/app_file.bzl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ def _impl(ctx):
3434
else:
3535
registered_list = ""
3636

37-
applications = ["kernel", "stdlib"] + ctx.attr.extra_apps
38-
for dep in ctx.attr.deps:
39-
applications.append(dep[ErlangAppInfo].app_name)
40-
applications_list = "[" + ",".join(applications) + "]"
37+
applications_list = ""
38+
if src == "" or len(ctx.attr.extra_apps > 0) or len(ctx.attr.deps) > 0:
39+
applications = ["kernel", "stdlib"] + ctx.attr.extra_apps
40+
for dep in ctx.attr.deps:
41+
applications.append(dep[ErlangAppInfo].app_name)
42+
applications_list = "[" + ",".join(applications) + "]"
4143

4244
stamp = ctx.attr.stamp == 1 or (ctx.attr.stamp == -1 and
4345
ctx.attr.private_stamp_detect)

0 commit comments

Comments
 (0)