mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
build: minify-build-system: Fail to install empty files.
* guix/build/minify-build-system.scm (install): Produce an error if the minified file is zero bytes.
This commit is contained in:
parent
843e772051
commit
5b77e9ca14
1 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -54,7 +55,11 @@ (define* (install #:key outputs #:allow-other-keys)
|
|||
(let* ((out (assoc-ref outputs "out"))
|
||||
(js (string-append out "/share/javascript/")))
|
||||
(mkdir-p js)
|
||||
(for-each (cut install-file <> js)
|
||||
(for-each
|
||||
(lambda (file)
|
||||
(if (not (zero? (stat:size (stat file))))
|
||||
(install-file file js)
|
||||
(error "File is empty: " file)))
|
||||
(find-files "guix/build" "\\.min\\.js$")))
|
||||
#t)
|
||||
|
||||
|
|
Loading…
Reference in a new issue