scripts: environment: Improve error messages.
* guix/scripts/environment.scm (guix-environment): Wrap procedure body with error handling form.
This commit is contained in:
parent
2f094a69f0
commit
5762f3062c
@ -220,21 +220,22 @@ packages."
|
|||||||
(define (handle-argument arg result)
|
(define (handle-argument arg result)
|
||||||
(alist-cons 'package arg result))
|
(alist-cons 'package arg result))
|
||||||
|
|
||||||
(with-store store
|
(with-error-handling
|
||||||
(let* ((opts (parse-command-line args %options (list %default-options)
|
(with-store store
|
||||||
#:argument-handler handle-argument))
|
(let* ((opts (parse-command-line args %options (list %default-options)
|
||||||
(pure? (assoc-ref opts 'pure))
|
#:argument-handler handle-argument))
|
||||||
(command (assoc-ref opts 'exec))
|
(pure? (assoc-ref opts 'pure))
|
||||||
(inputs (packages->transitive-inputs
|
(command (assoc-ref opts 'exec))
|
||||||
(pick-all (options/resolve-packages opts) 'package)))
|
(inputs (packages->transitive-inputs
|
||||||
(drvs (run-with-store store
|
(pick-all (options/resolve-packages opts) 'package)))
|
||||||
(mbegin %store-monad
|
(drvs (run-with-store store
|
||||||
(set-guile-for-build (default-guile))
|
(mbegin %store-monad
|
||||||
(build-inputs inputs opts)))))
|
(set-guile-for-build (default-guile))
|
||||||
(cond ((assoc-ref opts 'dry-run?)
|
(build-inputs inputs opts)))))
|
||||||
#t)
|
(cond ((assoc-ref opts 'dry-run?)
|
||||||
((assoc-ref opts 'search-paths)
|
#t)
|
||||||
(show-search-paths inputs drvs pure?))
|
((assoc-ref opts 'search-paths)
|
||||||
(else
|
(show-search-paths inputs drvs pure?))
|
||||||
(create-environment inputs drvs pure?)
|
(else
|
||||||
(system command))))))
|
(create-environment inputs drvs pure?)
|
||||||
|
(system command)))))))
|
||||||
|
Loading…
Reference in New Issue
Block a user