guix build: Emit "nothing to do" warning only when needed.

This is a followup to 681af1fb78a735b51dc811aed770b2948212c3fc.

* guix/scripts/build.scm (guix-build): Emit "nothing to do" warning only
when both DRV and ITEMS are null.
This commit is contained in:
Ludovic Courtès 2021-05-28 22:09:58 +02:00
parent 22f95a09eb
commit a44fa3742c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

@ -679,8 +679,8 @@ needed."
(_ #f))
opts)))
(when (null? items)
(warning (G_ "no arguments specified, nothing to build~%")))
(when (and (null? drv) (null? items))
(warning (G_ "no arguments specified, nothing to do~%")))
(cond ((assoc-ref opts 'log-file?)
;; Pass 'show-build-log' the output file names, not the