From a44fa3742c34a017d1a9a06c45c03f429614e584 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 28 May 2021 22:09:58 +0200 Subject: 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. --- guix/scripts/build.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index f2b8ca135e..97e2f5a167 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -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 -- cgit v1.2.3