[bug#33448] describe: Fix 'format' option.

Message ID 20181120222616.3941-1-go.wigust@gmail.com
State Accepted
Commit 3dd28aa37cc3f3a6bbb5f7f8d9fb49cc457b0c10
Headers show
Series [bug#33448] describe: Fix 'format' option. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Oleg Pykhalov Nov. 20, 2018, 10:26 p.m. UTC
Fix ‘guix describe’ ignores ‘--format=FORMAT’ option.

* guix/scripts/describe.scm (%options): Fix 'format' option.
---
 guix/scripts/describe.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ludovic Courtès Nov. 21, 2018, 10:47 a.m. UTC | #1
Oleg Pykhalov <go.wigust@gmail.com> skribis:

> Fix ‘guix describe’ ignores ‘--format=FORMAT’ option.
>
> * guix/scripts/describe.scm (%options): Fix 'format' option.

Oops, good catch.  LGTM!

Ludo’.
Oleg Pykhalov Nov. 21, 2018, 11:46 a.m. UTC | #2
ludo@gnu.org (Ludovic Courtès) writes:

> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> Fix ‘guix describe’ ignores ‘--format=FORMAT’ option.
>>
>> * guix/scripts/describe.scm (%options): Fix 'format' option.
>
> Oops, good catch.  LGTM!

Pushed as 3dd28aa37cc3f3a6bbb5f7f8d9fb49cc457b0c10

Patch

diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index e59502076..d3203e992 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -40,7 +40,7 @@ 
                 (lambda (opt name arg result)
                   (unless (member arg '("human" "channels"))
                     (leave (G_ "~a: unsupported output format~%") arg))
-                  (alist-cons 'format 'channels result)))
+                  (alist-cons 'format (string->symbol arg) result)))
         (option '(#\h "help") #f #f
                 (lambda args
                   (show-help)