scripts: repl: Extend REPL %load-path with all channels.

Fixes <https://bugs.gnu.org/61343>.
Reported by 宋文武 <iyzsong@envs.net>.

* guix/scripts/repl.scm (define-command): Before starting the REPL,
call 'current-profile' to populate (%package-module-path).

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Simon Tournier 2023-02-17 15:56:27 +01:00 committed by Ludovic Courtès
parent a516a0ba93
commit 96739561b8
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -211,6 +211,7 @@ (define script
((guile)
(save-module-excursion
(lambda ()
(current-profile) ;populate (%package-module-path); see above
(set-user-module)
;; Do not exit repl on SIGINT.
((@@ (ice-9 top-repl) call-with-sigint)