hare

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

commit 42c99d782d55c0b39f37fbc1b9138b28227696d2
parent 691b44ac9a1339768ff0ec6a4e3adfd1f3d114bc
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon, 30 Aug 2021 20:39:27 +0200

cmd/hare: add environment to -v

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

Diffstat:
Mcmd/hare/plan.ha | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/cmd/hare/plan.ha b/cmd/hare/plan.ha @@ -92,6 +92,14 @@ fn plan_finish(plan: *plan) void = { }; fn plan_execute(plan: *plan, verbose: bool) (void | !exec::exit_status) = { + if (verbose) { + for (let i = 0z; i < len(plan.environ); i += 1) { + // TODO: Uncomment this with shlex::quote + let item = plan.environ[i]; + fmt::errorfln("# {}={}", item.0, item.1)!; + }; + }; + for (len(plan.scheduled) != 0) { let next: nullable *task = null; let i = 0z;