[Top][All Lists]

[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: Thu, 05 Aug 2021 11:16:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Dale Mellor <mcron-lsfnyl@rdmp.org> writes:

> On Wed, 2021-08-04 at 17:58 +0200, Mathieu Lirzin wrote:
>> 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))))))
> No it doesn't, something like
>     mcron -s schedule.guile
> fails.  The fix needs to happen inside getopt-long.

Oh indeed, I overlooked that.

If the ‘dm-v1.2.1’ branch is fixing that, I think we should merge it to
fix the regression introduced in 1.2.0. We can always revisit the
implementation later.

Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

reply via email to

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