Subject: [PATCH 2/2] scripts: repl: Canonicalize 'load-path' option.

From: zimoun <[email-masked]>
Date: Mon, 27 Jul 2020 23:47:54 +0200

* guix/scripts/repl.scm: Use (guix scripts build) '%standard-build-options' to
deal with 'load-path' option.
---
 guix/scripts/repl.scm | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index 0ea9c3655c..59edb543d1 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -21,6 +21,7 @@
 (define-module (guix scripts repl)
   #:use-module (guix ui)
   #:use-module (guix scripts)
+  #:use-module ((guix scripts build) #:select (%standard-build-options))
   #:use-module (guix repl)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
@@ -57,12 +58,9 @@
         (option '(#\q) #f #f
                 (lambda (opt name arg result)
                   (alist-cons 'ignore-dot-guile? #t result)))
-        (option '(#\L "load-path") #t #f
-                (lambda (opt name arg result)
-                  ;; XXX: Imperatively modify the search paths.
-                  (set! %load-path (cons arg %load-path))
-                  (set! %load-compiled-path (cons arg %load-compiled-path))
-                  result))))
+        (find (lambda (option)
+                (member "load-path" (option-names option)))
+              %standard-build-options)))

 (define (show-help)
-- 
2.26.2