summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorKonrad Hinsen <konrad.hinsen@fastmail.net>2020-09-11 13:13:26 +0200
committerLudovic Courtès <ludo@gnu.org>2020-09-16 16:04:01 +0200
commitd7f7ed39be3be926b3c46c0ea15d416c593ef61f (patch)
treeac8e59c5e4be19c84aeaf46a98142b21fc9d518f /guix
parent7194b63833f3cbcd29a65bae0ecd6876cdb1f197 (diff)
repl: Look for script files in (getcwd).
Fixes <https://bugs.gnu.org/43331>. * guix/scripts/repl.scm (guix-repl): Replace "." by (getcwd) * tests/guix-repl.sh: Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/repl.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index 3c79e89f8d..7d4e474e92 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -178,7 +178,10 @@ call THUNK."
(lambda ()
(set-program-arguments script)
(set-user-module)
- (load-in-vicinity "." (car script)))))
+
+ ;; When passed a relative file name, 'load-in-vicinity' searches the
+ ;; file in %LOAD-PATH. Thus, pass (getcwd) instead of ".".
+ (load-in-vicinity (getcwd) (car script)))))
(when (null? script)
;; Start REPL