~sircmpwn/hare unlisted

5db6a44a63ff95295e5c2310cd3169833f4fccde — Drew DeVault 2 months ago ad59f13
cmd/hare: add HARE_DEBUG_WORKDIR variable

This leaves the workdir around after a build.

Signed-off-by: Drew DeVault <sir@cmpwn.com>
2 files changed, 3 insertions(+), 2 deletions(-)

M cmd/hare/plan.ha
M cmd/hare/subcmds.ha
M cmd/hare/plan.ha => cmd/hare/plan.ha +3 -1
@@ 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) {

M cmd/hare/subcmds.ha => cmd/hare/subcmds.ha +0 -1
@@ 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);