Skip to content
Snippets Groups Projects
Commit 2b8cf44f authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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.
parent e8b3afeb
No related branches found
No related tags found
No related merge requests found
......@@ -397,8 +397,14 @@ (define directory
(compose (cut string-append <> "/guix/scripts")
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
(scandir directory (cut string-suffix? ".scm" <>))
(filter dot-scm? (scandir directory dot-scm?))
'()))
(define (commands)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment