From 98173af5222ab5e879e44ba9521dec5416ba8c60 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 30 Oct 2021 16:35:06 +0200 Subject: shell: Error out when an unauthorized guix.scm/manifest.scm is found. The previous behavior was confusing: a warning would be printed and 'guix shell' would go on starting an empty environment. Reported by Tobias Geerinckx-Rice . * guix/scripts/shell.scm (auto-detect-manifest): Change "not loading" case from warning to error. * tests/guix-shell.sh: Adjust accordingly. --- guix/scripts/shell.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'guix/scripts/shell.scm') diff --git a/guix/scripts/shell.scm b/guix/scripts/shell.scm index c7eba429d5..5749485a44 100644 --- a/guix/scripts/shell.scm +++ b/guix/scripts/shell.scm @@ -283,8 +283,9 @@ Return the modified OPTS." ("guix.scm" (alist-cons 'load `(package ,file) opts)) ("manifest.scm" (alist-cons 'manifest file opts)))) (begin - (warning (G_ "not loading '~a' because not authorized to do so~%") - file) + (report-error + (G_ "not loading '~a' because not authorized to do so~%") + file) (display-hint (format #f (G_ "To allow automatic loading of @file{~a} when running @command{guix shell}, you must explicitly authorize its directory, like so: @@ -295,7 +296,7 @@ echo ~a >> ~a file (dirname file) (authorized-directory-file))) - opts)))))) + (exit 1))))))) ;;; -- cgit v1.2.3