From 297b29190eb10576de1a5f736286bcbc3d4a6352 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 9 Apr 2018 10:34:58 +0200 Subject: evaluate: Change '%load-path' once and for all. * bin/evaluate.in (main): Do not restore the original '%load-path'. --- bin/evaluate.in | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'bin') 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. -- cgit v1.2.3