guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#41219] [PATCH 2/2] guix: Enforce package.json "files" directive.


From: paul
Subject: [bug#41219] [PATCH 2/2] guix: Enforce package.json "files" directive.
Date: Mon, 19 Oct 2020 01:32:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Icedove/78.3.2

Dear Jelle,

On 9/22/20 8:09 PM, Jelle Licht wrote:
Hey Giacomo,

paul <goodoldpaul@autistici.org> writes:
+         install-dir)
+        (begin
+          (copy-recursively "." install-dir)
+          ;; Remove references to dependencies
+          (delete-file-recursively
+           (string-append install-dir "/node_modules"))))
+    (if (and main
+             (not (file-exists?
+                   (string-append
+                    install-dir "/" (dirname main)))))
                                           ^

{New,Forgotten} nitpick; this only checks for the `dirname': why not
just `(string-append install-dir "/" main)'? Because if
e.g. "lib/utils.js" is in "files", and main is "lib/main.js", it seems
that main would not be installed with this snippet. Does that make
sense?

Yes it definitely does. I believe I fixed this in the attached patch.

Thank you for your review,

Giacomo

Attachment: 0002-guix-Enforce-package.json-files-directive.patch
Description: Text Data


reply via email to

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