aboutsummaryrefslogtreecommitdiff
path: root/module/hnh/util/env.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-07 18:03:40 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-11 18:00:15 +0200
commit01987c093e2cfbd46115cc58e4ff9f789efb9d0d (patch)
tree841382c97a62e9108dcabb0e5c4e27c5ab459d19 /module/hnh/util/env.scm
parentFixes to xdg basedir. (diff)
downloadcalp-01987c093e2cfbd46115cc58e4ff9f789efb9d0d.tar.gz
calp-01987c093e2cfbd46115cc58e4ff9f789efb9d0d.tar.xz
Enable let-env to unset variables.
Diffstat (limited to 'module/hnh/util/env.scm')
-rw-r--r--module/hnh/util/env.scm6
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 ()