[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -s/--schedule requires value
From: |
Dale Mellor |
Subject: |
Re: -s/--schedule requires value |
Date: |
Thu, 05 Aug 2021 08:54:43 +0100 |
User-agent: |
Evolution 3.30.5-1.1 |
Hello,
>
>
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:
> > > ...
Dale Mellor <mcron-lsfnyl@rdmp.org> writes:
> > 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.
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.