[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -s/--schedule requires value
From: |
Mathieu Lirzin |
Subject: |
Re: -s/--schedule requires value |
Date: |
Wed, 04 Aug 2021 17:58:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hello,
Dale Mellor <mcron-lsfnyl@rdmp.org> writes:
> On Sat, 2021-07-10 at 21:20 -0700, Matthew James Kraai wrote:
>>
>> When I run mcron 1.2.0 in Guix with -s or --schedule without a
>> value, it
>> displays the following error:
>> ...
>
> This is a known issue with the current implementation. The
> problem lies with the getopt-long module in Guile for which I've
> submitted a fix but there has been no movement on that. The
> mcron GIT repository contains a branch called dm-v1.2.1 which
> fully incorporates the fix into the mcron codebase; you can try
> that if you are able to build and install software on your system
> outside of a package manager.
I think the issue is not related to a limitation in getopt-long. After a
quick look it appears that the "predicate" function used in the ‘schedule’ opts
specification is too restrictive because it doesn't accept ‘#t’:
(schedule (single-char #\s) (value optional)
(predicate ,string->number))
I did not test but I guess something like the following might solve the issue:
... (predicate ,(lambda (x)
(or (boolean? x)
(string->number x))))))
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
- Re: -s/--schedule requires value,
Mathieu Lirzin <=