aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/javascript.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-05-16 17:06:18 +0200
committerLudovic Courtès <ludo@gnu.org>2019-05-16 17:06:18 +0200
commit9da2dd90e2e8db8cfb922eb0c064876c146070dd (patch)
treec28af71eef5ce5ead9ce9e9508279bea673ae0ae /gnu/packages/javascript.scm
parent9c64080dce9fa3e77c48ae962ff1edc5d0863c6a (diff)
downloadpatches-9da2dd90e2e8db8cfb922eb0c064876c146070dd.tar
patches-9da2dd90e2e8db8cfb922eb0c064876c146070dd.tar.gz
gnu: js-mathjax: Avoid "Too many open files" error while building.
* gnu/packages/javascript.scm (js-mathjax)[arguments]: Add call to 'close-pipe'. Previously builds would sometimes fail with EMFILE (this was non-deterministic as it depends on GC activity.)
Diffstat (limited to 'gnu/packages/javascript.scm')
-rw-r--r--gnu/packages/javascript.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index 8731a44927..e7dcd7962d 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -117,7 +117,11 @@
(let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
(call-with-output-file installed
(lambda (port)
- (dump-port minified port)))))
+ (dump-port minified port)))
+
+ (let ((exit (close-pipe minified)))
+ (unless (zero? exit)
+ (error "dear, uglify-js failed" exit)))))
(else
(install-file file (dirname installed))))))
(find-files "."))