From d7f7ed39be3be926b3c46c0ea15d416c593ef61f Mon Sep 17 00:00:00 2001 From: Konrad Hinsen Date: Fri, 11 Sep 2020 13:13:26 +0200 Subject: repl: Look for script files in (getcwd). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . * guix/scripts/repl.scm (guix-repl): Replace "." by (getcwd) * tests/guix-repl.sh: Add test. Co-authored-by: Ludovic Courtès --- guix/scripts/repl.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'guix') 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 -- cgit v1.2.3