mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
environment: Connect to the store after the command line has been parsed.
* guix/scripts/environment.scm (guix-environment): Call 'parse-command-line' outside of 'with-store'. This allows things like --help to run even if the daemon is not running.
This commit is contained in:
parent
57cd353d87
commit
c2590362ad
1 changed files with 15 additions and 13 deletions
|
@ -232,7 +232,6 @@ (define (handle-argument arg result)
|
|||
(alist-cons 'package arg result))
|
||||
|
||||
(with-error-handling
|
||||
(with-store store
|
||||
(let* ((opts (parse-command-line args %options (list %default-options)
|
||||
#:argument-handler handle-argument))
|
||||
(pure? (assoc-ref opts 'pure))
|
||||
|
@ -241,11 +240,14 @@ (define (handle-argument arg result)
|
|||
(packages (pick-all (options/resolve-packages opts) 'package))
|
||||
(inputs (if ad-hoc?
|
||||
(packages+propagated-inputs packages)
|
||||
(packages->transitive-inputs packages)))
|
||||
(drvs (run-with-store store
|
||||
(packages->transitive-inputs packages))))
|
||||
(with-store store
|
||||
(define drvs
|
||||
(run-with-store store
|
||||
(mbegin %store-monad
|
||||
(set-guile-for-build (default-guile))
|
||||
(build-inputs inputs opts)))))
|
||||
(build-inputs inputs opts))))
|
||||
|
||||
(cond ((assoc-ref opts 'dry-run?)
|
||||
#t)
|
||||
((assoc-ref opts 'search-paths)
|
||||
|
|
Loading…
Reference in a new issue