hare

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

commit 574397ac4350870cb14ac0bff5e817aa853ca4ee
parent 9ebc72a6b82fee7401dc2e451f65abd9f5dcf8b3
Author: Sebastian <sebastian@sebsite.pw>
Date:   Wed, 18 May 2022 23:42:33 -0400

cmd/hare: use shlex to quote environ

Signed-off-by: Sebastian <sebastian@sebsite.pw>

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

diff --git a/cmd/hare/plan.ha b/cmd/hare/plan.ha @@ -10,6 +10,7 @@ use io; use os::exec; use os; use path; +use shlex; use strings; use temp; use unix::tty; @@ -148,9 +149,9 @@ fn plan_execute(plan: *plan, verbose: bool) (void | !exec::exit_status) = { if (verbose) { plan.progress.tty = void; 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)!; + fmt::errorf("# {}=", item.0)!; + shlex::quote(os::stderr, item.1)!; }; };