hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 5db6a44a63ff95295e5c2310cd3169833f4fccde
parent ad59f1354e785679a7833aea8c47410653231c23
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri,  9 Jul 2021 12:20:45 -0400

cmd/hare: add HARE_DEBUG_WORKDIR variable

This leaves the workdir around after a build.

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Mcmd/hare/plan.ha | 4+++-
Mcmd/hare/subcmds.ha | 1-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmd/hare/plan.ha b/cmd/hare/plan.ha @@ -63,7 +63,9 @@ fn mkplan(ctx: *module::context) plan = { }; fn plan_finish(plan: *plan) void = { - os::rmdirall(plan.workdir)!; + if (os::getenv("HARE_DEBUG_WORKDIR") is void) { + os::rmdirall(plan.workdir)!; + }; free(plan.workdir); for (let i = 0z; i < len(plan.complete); i += 1) { diff --git a/cmd/hare/subcmds.ha b/cmd/hare/subcmds.ha @@ -354,7 +354,6 @@ fn test(args: []str) void = { runargs = cmd.args[1..]; }; - const ctx = module::context_init(tags, defines, HAREPATH); defer module::context_finish(&ctx);