commit 766d4b0659755b49ff7aa9fbcfef82931c8432cf
parent fedd4ea7a6a22c9f012f6d3371649573402e7ed6
Author: Ember Sawady <ecs@d2evs.net>
Date: Mon, 11 Sep 2023 22:34:40 +0000
cmd/hare: respect -N
Signed-off-by: Ember Sawady <ecs@d2evs.net>
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cmd/hare/build/util.ha b/cmd/hare/build/util.ha
@@ -110,7 +110,10 @@ fn get_flags(ctx: *context, t: *task) ([]str | error) = {
};
let mod = ctx.mods[t.idx];
- if (len(mod.ns) != 0 || len(ctx.libs) != 0) {
+ if (len(ctx.ns) != 0 && t.idx == ctx.top) {
+ append(flags, strings::dup("-N"));
+ append(flags, unparse::identstr(ctx.ns));
+ } else if (len(mod.ns) != 0 || len(ctx.libs) != 0) {
append(flags, strings::dup("-N"));
append(flags, unparse::identstr(mod.ns));
};