aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/environment.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-03-01 11:12:11 +0100
committerLudovic Courtès <ludo@gnu.org>2021-03-01 17:45:50 +0100
commit9ce78f27a02b3a5fcaea2f0633404b940795989a (patch)
treeb28312f7ab14ed0de96da0077393acf9fba3177c /guix/scripts/environment.scm
parent7ca43b0a1e2215abe0df0708f31decace8e68911 (diff)
downloadguix-9ce78f27a02b3a5fcaea2f0633404b940795989a.tar
guix-9ce78f27a02b3a5fcaea2f0633404b940795989a.tar.gz
environment: Allow compilation with Guile 2.2.
Fixes <https://bugs.gnu.org/46826>. Reported by cage <cage-dev@twistfold.it>. * guix/scripts/environment.scm (guix-environment): Move 'manifest' definition before expression.
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r--guix/scripts/environment.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index a39347743e..0360761683 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2018 David Thompson <davet@gnu.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mike Gerwitz <mtg@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -745,14 +745,15 @@ message if any test fails."
(with-status-verbosity (assoc-ref opts 'verbosity)
(define manifest-from-opts
(options/resolve-packages store opts))
- (when (and profile
- (> (length (manifest-entries manifest-from-opts)) 0))
- (leave (G_ "'--profile' cannot be used with package options~%")))
(define manifest
(if profile
- (profile-manifest profile)
- manifest-from-opts))
+ (profile-manifest profile)
+ manifest-from-opts))
+
+ (when (and profile
+ (> (length (manifest-entries manifest-from-opts)) 0))
+ (leave (G_ "'--profile' cannot be used with package options~%")))
(set-build-options-from-command-line store opts)