summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.