summaryrefslogtreecommitdiff
path: root/tests/guix-shell.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-10-30 16:35:06 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-30 19:12:40 +0200
commit98173af5222ab5e879e44ba9521dec5416ba8c60 (patch)
tree5dbe15aefc74edd98223c6d06bd3b9eeb43c3a58 /tests/guix-shell.sh
parentbcce83c7857d226a053a8563fc4e326a47fca473 (diff)
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 <me@tobias.gr>. * guix/scripts/shell.scm (auto-detect-manifest): Change "not loading" case from warning to error. * tests/guix-shell.sh: Adjust accordingly.
Diffstat (limited to 'tests/guix-shell.sh')
-rw-r--r--tests/guix-shell.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/guix-shell.sh b/tests/guix-shell.sh
index 95725cba2d..3bdf625189 100644
--- a/tests/guix-shell.sh
+++ b/tests/guix-shell.sh
@@ -39,7 +39,9 @@ guix shell --bootstrap --pure guile-bootstrap -- guile --version
cat > "$tmpdir/guix.scm" <<EOF
This is a broken guix.scm file.
EOF
-(cd "$tmpdir"; SHELL="$(type -P true)" guix shell --bootstrap)
+! (cd "$tmpdir"; SHELL="$(type -P true)" guix shell --bootstrap 2> "stderr")
+grep "not authorized" "$tmpdir/stderr"
+rm "$tmpdir/stderr"
# Authorize the directory.
echo "$(realpath "$tmpdir")" > "$configdir/guix/shell-authorized-directories"