copy: Actually implement '--dry-run'.
authorLudovic Courtès <ludo@gnu.org>
Sun, 22 Mar 2020 11:25:39 +0000 (12:25 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 22 Mar 2020 11:42:52 +0000 (12:42 +0100)
* guix/scripts/copy.scm (%options): Add '--dry-run'.

guix/scripts/copy.scm

index 2542df6..fdb684c 100644 (file)
@@ -138,6 +138,10 @@ Copy ITEMS to or from the specified host over SSH.\n"))
                    (let ((level (string->number* arg)))
                      (alist-cons 'verbosity level
                                  (alist-delete 'verbosity result)))))
+         (option '(#\n "dry-run") #f #f
+                 (lambda (opt name arg result)
+                   (alist-cons 'dry-run? #t (alist-cons 'graft? #f result))))
+
          (option '(#\h "help") #f #f
                  (lambda args
                    (show-help)