guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/14: style: ‘guix style -f’ warns when passed zero arguments.


From: guix-commits
Subject: 01/14: style: ‘guix style -f’ warns when passed zero arguments.
Date: Wed, 22 Nov 2023 10:52:42 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit c39c89c11eb58b825ab4adbe53165b20b6f1e6f4
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Nov 20 14:50:49 2023 +0100

    style: ‘guix style -f’ warns when passed zero arguments.
    
    * guix/scripts/style.scm (guix-style): When OPTS has ‘whole-file?’ set,
    warn when FILES is empty.
    
    Change-Id: I494f52ef5d070510d20006e6dd987a6805161bb4
---
 guix/scripts/style.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm
index 145cd09881..211980dc1c 100644
--- a/guix/scripts/style.scm
+++ b/guix/scripts/style.scm
@@ -625,6 +625,8 @@ Update package definitions to the latest style.\n"))
                                    opts)))
             (unless (eq? format-package-definition style)
               (warning (G_ "'--styling' option has no effect in whole-file 
mode~%")))
+            (when (null? files)
+              (warning (G_ "no files specified, nothing to do~%")))
             (for-each format-whole-file files))
           (let ((packages (filter-map (match-lambda
                                         (('argument . spec)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]