aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-04-09 10:34:58 +0200
committerLudovic Courtès <ludo@gnu.org>2018-04-09 10:34:58 +0200
commit297b29190eb10576de1a5f736286bcbc3d4a6352 (patch)
tree9185ff784626672a67b562794daaa8f6c8419747
parentc2298d440b033c69fce6a6b01ab34dcc840aa775 (diff)
downloadcuirass-297b29190eb10576de1a5f736286bcbc3d4a6352.tar
cuirass-297b29190eb10576de1a5f736286bcbc3d4a6352.tar.gz
evaluate: Change '%load-path' once and for all.
* bin/evaluate.in (main): Do not restore the original '%load-path'.
-rw-r--r--bin/evaluate.in13
1 files changed, 5 insertions, 8 deletions
diff --git a/bin/evaluate.in b/bin/evaluate.in
index 39287c9..d973c44 100644
--- a/bin/evaluate.in
+++ b/bin/evaluate.in
@@ -58,17 +58,14 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
;; file names work as expected.
(chdir source)
+ ;; Change '%load-path' once and for all. We need it to be effective
+ ;; both when we load SPEC's #:file and when we later call the thunks.
+ (set! %load-path (append load-path %load-path))
+
(save-module-excursion
(lambda ()
(set-current-module %user-module)
- (let ((original-path %load-path))
- (dynamic-wind
- (lambda ()
- (set! %load-path (append load-path original-path)))
- (lambda ()
- (primitive-load (assq-ref spec #:file)))
- (lambda ()
- (set! %load-path original-path))))))
+ (primitive-load (assq-ref spec #:file))))
;; From there on we can access Guix modules.