diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-07 18:03:40 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-11 18:00:15 +0200 |
commit | 01987c093e2cfbd46115cc58e4ff9f789efb9d0d (patch) | |
tree | 841382c97a62e9108dcabb0e5c4e27c5ab459d19 /module | |
parent | Fixes to xdg basedir. (diff) | |
download | calp-01987c093e2cfbd46115cc58e4ff9f789efb9d0d.tar.gz calp-01987c093e2cfbd46115cc58e4ff9f789efb9d0d.tar.xz |
Enable let-env to unset variables.
Diffstat (limited to '')
-rw-r--r-- | module/hnh/util/env.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/hnh/util/env.scm b/module/hnh/util/env.scm index 18ec0543..bb42d966 100644 --- a/module/hnh/util/env.scm +++ b/module/hnh/util/env.scm @@ -14,7 +14,11 @@ (list n new-value (getenv n))) (list (symbol->string (quote name)) ...) (list value ...))) - (for-each (lambda (pair) (setenv (car pair) (cadr pair))) + (for-each (lambda (pair) + (if (cadr pair) + (setenv (car pair) + (cadr pair)) + (unsetenv (car pair)))) env-pairs)) (lambda () body ...) (lambda () |