aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-05-28 09:56:31 +0200
committerLudovic Courtès <ludo@gnu.org>2021-05-28 11:36:02 +0200
commit7243a8c7ecf1421183d01cbd4631191a861376a4 (patch)
tree02d2d0ce32cd169bf14c3e826a659c55e6ab2db2
parentc82b374979ce6d3c2883b9cc6842711779903f15 (diff)
downloadguix-7243a8c7ecf1421183d01cbd4631191a861376a4.tar.gz
guix-7243a8c7ecf1421183d01cbd4631191a861376a4.zip
deploy: Error out when the FILE argument is missing.
* guix/scripts/deploy.scm (guix-deploy): Error out when FILE is false.
-rw-r--r--guix/scripts/deploy.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 0725fba54b..bf2e8afa7f 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 David Thompson <davet@gnu.org>
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
-;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -156,7 +156,10 @@ Perform the deployment specified by FILE.\n"))
(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)) '())))
+ (machines (and file (load-source-file file))))
+ (unless file
+ (leave (G_ "missing deployment file argument~%")))
+
(show-what-to-deploy machines)
(with-status-verbosity (assoc-ref opts 'verbosity)