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

This is a followup to 681af1fb78.

* 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

View file

@ -679,8 +679,8 @@ (define graft?
(_ #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