|
From: | paul |
Subject: | [bug#41219] [PATCH 2/2] guix: Enforce package.json "files" directive. |
Date: | Tue, 22 Sep 2020 17:47:23 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Icedove/68.12.0 |
Hi Jelle, just a quick follow up that I forgot yesterday.
This seems to be necessary because given the way glob-match? is implemented a string matches a pattern iif either they start with the same character or the pattern starts with a wildcard. So for example:+ (map (lambda (path) + (string-drop path 2))^ If this is meant to drop the "./" prefix, you should be able to leave it out.
scheme@(guix-user)> ,use (guix glob) scheme@(guix-user)> (string->compiled-sglob "*.json") $1 = (* ".json") scheme@(guix-user)> (string->compiled-sglob "package.json") $2 = "package.json" scheme@(guix-user)> (glob-match? $1 "./package.json") $3 = #t scheme@(guix-user)> (glob-match? $2 "./package.json") $4 = #f Thank you again for your help, Cheers Giacomo
[Prev in Thread] | Current Thread | [Next in Thread] |