diff --git a/guix/ui.scm b/guix/ui.scm
index 1c0dd11edcabbf9c7eeacd18aeb8d2f6a18ba494..b9ba8c0f7af2bf9bfdea736eee0004972775f821 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1078,12 +1078,15 @@ (define inputs
                      #f))
                   things))
 
-    (show-what-to-build store inputs
-                        #:dry-run? dry-run?
-                        #:use-substitutes? use-substitutes?
-                        #:mode mode)
-    (unless dry-run?
-      (continue #t))))
+    (let-values (((build? download?)
+                  (show-what-to-build store inputs
+                                      #:dry-run? dry-run?
+                                      #:use-substitutes? use-substitutes?
+                                      #:mode mode)))
+
+      (unless (and (or build? download?)
+                   dry-run?)
+        (continue #t)))))
 
 (define (right-arrow port)
   "Return either a string containing the 'RIGHT ARROW' character, or an ASCII