mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-28 14:01:29 -05:00
Fix "guix --help" on Guile 2.0.5.
Reported at <http://linuxfr.org/news/sortie-de-gnu-guix-0-2>. * guix/ui.scm (command-files): Filter the result of `scandir' to make sure only `.scm' files are present.
This commit is contained in:
parent
e8b3afeb92
commit
2b8cf44fd9
1 changed files with 7 additions and 1 deletions
|
@ -397,8 +397,14 @@ (define directory
|
||||||
(compose (cut string-append <> "/guix/scripts")
|
(compose (cut string-append <> "/guix/scripts")
|
||||||
dirname)))
|
dirname)))
|
||||||
|
|
||||||
|
(define dot-scm?
|
||||||
|
(cut string-suffix? ".scm" <>))
|
||||||
|
|
||||||
|
;; In Guile 2.0.5 `scandir' would return "." and ".." regardless even though
|
||||||
|
;; they don't match `dot-scm?'. Work around it by doing additional
|
||||||
|
;; filtering.
|
||||||
(if directory
|
(if directory
|
||||||
(scandir directory (cut string-suffix? ".scm" <>))
|
(filter dot-scm? (scandir directory dot-scm?))
|
||||||
'()))
|
'()))
|
||||||
|
|
||||||
(define (commands)
|
(define (commands)
|
||||||
|
|
Loading…
Reference in a new issue