summaryrefslogtreecommitdiff
path: root/guix/scripts/deploy.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-08-26 18:35:14 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-08-26 18:35:14 +0200
commit17dddeeee560527a8f30d37761949d658056cb09 (patch)
tree15b0b19c55787f556eb9b42c28d173bddc5435db /guix/scripts/deploy.scm
parent331a09654eb7e9f6212b7e8469077fa7393e8b11 (diff)
parent6a9581741e4ee81226aeb2f1c997df76670a6aab (diff)
downloadguix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar
guix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/scripts/deploy.scm')
-rw-r--r--guix/scripts/deploy.scm33
1 files changed, 18 insertions, 15 deletions
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 4466a0c632..4a68197620 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -140,18 +140,21 @@ Perform the deployment specified by FILE.\n"))
(define (handle-argument arg result)
(alist-cons 'file arg result))
- (let* ((opts (parse-command-line args %options (list %default-options)
- #:argument-handler handle-argument))
- (file (assq-ref opts 'file))
- (machines (or (and file (load-source-file file)) '())))
- (show-what-to-deploy machines)
-
- (with-status-verbosity (assoc-ref opts 'verbosity)
- (with-store store
- (set-build-options-from-command-line store opts)
- (with-build-handler (build-notifier #:use-substitutes?
- (assoc-ref opts 'substitutes?))
- (parameterize ((%graft? (assq-ref opts 'graft?)))
- (map/accumulate-builds store
- (cut deploy-machine* store <>)
- machines)))))))
+ (with-error-handling
+ (let* ((opts (parse-command-line args %options (list %default-options)
+ #:argument-handler handle-argument))
+ (file (assq-ref opts 'file))
+ (machines (or (and file (load-source-file file)) '())))
+ (show-what-to-deploy machines)
+
+ (with-status-verbosity (assoc-ref opts 'verbosity)
+ (with-store store
+ (set-build-options-from-command-line store opts)
+ (with-build-handler (build-notifier #:use-substitutes?
+ (assoc-ref opts 'substitutes?)
+ #:verbosity
+ (assoc-ref opts 'verbosity))
+ (parameterize ((%graft? (assq-ref opts 'graft?)))
+ (map/accumulate-builds store
+ (cut deploy-machine* store <>)
+ machines))))))))