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.)
master
Ludovic Courtès 2019-05-16 17:06:18 +02:00
parent 9c64080dce
commit 9da2dd90e2
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 5 additions and 1 deletions

View File

@ -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 "."))