build-system/haskell: Fix register phase.

This is a follow-up to commit a7e231a2a3.

Reported by Marius Bakke <mbakke@fastmail.com>.

* guix/build/haskell-build-system.scm (register): Use "when" instead of
"unless".
This commit is contained in:
Ricardo Wurmus 2018-11-12 18:21:04 +01:00
parent 8c5749f1b5
commit 1767581fb5
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -239,7 +239,7 @@ (define (install-transitive-deps conf-file src dest)
(list (string-append "--gen-pkg-config=" config-file)))) (list (string-append "--gen-pkg-config=" config-file))))
(run-setuphs "register" params) (run-setuphs "register" params)
;; The conf file is created only when there is a library to register. ;; The conf file is created only when there is a library to register.
(unless (file-exists? config-file) (when (file-exists? config-file)
(mkdir-p config-dir) (mkdir-p config-dir)
(let* ((config-file-name+id (let* ((config-file-name+id
(call-with-ascii-input-file config-file (cut grep id-rx <>)))) (call-with-ascii-input-file config-file (cut grep id-rx <>))))