diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 803f7cf142..0d65857beb 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -341,11 +341,8 @@ (define (package-alist generation) (display-new/upgraded-packages (package-alist gen1) (package-alist gen2))) -(define (process-query opts) - "Process any query specified by OPTS." - (define profile - (string-append (config-directory) "/current")) - +(define (process-query opts profile) + "Process any query on PROFILE specified by OPTS." (match (assoc-ref opts 'query) (('list-generations pattern) (define (list-generations profile numbers) @@ -445,7 +442,7 @@ (define (guix-pull . args) (string-append (config-directory) "/current")))) (cond ((assoc-ref opts 'query) - (process-query opts)) + (process-query opts profile)) ((assoc-ref opts 'dry-run?) #t) ;XXX: not very useful (else