From ee6275c9744f8649bccc8cfa7c52d100044d7570 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 2 Mar 2022 11:58:51 +0100 Subject: shell: Disable caching when '-p' is passed. Fixes . Reported by Guillaume Le Vaillant . Previously we would wrongfully cache things, by adding a new (profile . _) pair to the option alist, when the user runs: guix shell -p /path/to/profile -q * guix/scripts/shell.scm (profile-cached-gc-root): Add ('profile . _) case. --- guix/scripts/shell.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guix/scripts/shell.scm b/guix/scripts/shell.scm index a92932cbc9..1eab05d737 100644 --- a/guix/scripts/shell.scm +++ b/guix/scripts/shell.scm @@ -372,6 +372,10 @@ return #f and #f." ;; least depending on external state (with-source, with-commit, etc.), ;; so do not cache anything when they're used. (values #f #f)) + ((('profile . _) . _) + ;; If the user already specified a profile, there's nothing more to + ;; cache. + (values #f #f)) ((('system . system) . rest) (loop rest system file specs)) ((_ . rest) (loop rest system file specs))))) -- cgit v1.2.3