Skip to content
Snippets Groups Projects
Commit 297b2919 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

evaluate: Change '%load-path' once and for all.

* bin/evaluate.in (main): Do not restore the original '%load-path'.
parent c2298d44
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment