store: Use 'when' instead of 'if' in effectful context.
* guix/store.scm (set-build-options): Use 'when' instead of 'if'.
This commit is contained in:
parent
7dc68701da
commit
371e87d286
|
@ -452,22 +452,22 @@ encoding conversion errors."
|
|||
(send (boolean keep-failed?) (boolean keep-going?)
|
||||
(boolean fallback?) (integer verbosity)
|
||||
(integer max-build-jobs) (integer max-silent-time))
|
||||
(if (>= (nix-server-minor-version server) 2)
|
||||
(send (boolean use-build-hook?)))
|
||||
(if (>= (nix-server-minor-version server) 4)
|
||||
(send (integer build-verbosity) (integer log-type)
|
||||
(boolean print-build-trace)))
|
||||
(if (>= (nix-server-minor-version server) 6)
|
||||
(send (integer build-cores)))
|
||||
(if (>= (nix-server-minor-version server) 10)
|
||||
(send (boolean use-substitutes?)))
|
||||
(if (>= (nix-server-minor-version server) 12)
|
||||
(send (string-list (fold-right (lambda (pair result)
|
||||
(match pair
|
||||
((h . t)
|
||||
(cons* h t result))))
|
||||
'()
|
||||
binary-caches))))
|
||||
(when (>= (nix-server-minor-version server) 2)
|
||||
(send (boolean use-build-hook?)))
|
||||
(when (>= (nix-server-minor-version server) 4)
|
||||
(send (integer build-verbosity) (integer log-type)
|
||||
(boolean print-build-trace)))
|
||||
(when (>= (nix-server-minor-version server) 6)
|
||||
(send (integer build-cores)))
|
||||
(when (>= (nix-server-minor-version server) 10)
|
||||
(send (boolean use-substitutes?)))
|
||||
(when (>= (nix-server-minor-version server) 12)
|
||||
(send (string-list (fold-right (lambda (pair result)
|
||||
(match pair
|
||||
((h . t)
|
||||
(cons* h t result))))
|
||||
'()
|
||||
binary-caches))))
|
||||
(let loop ((done? (process-stderr server)))
|
||||
(or done? (process-stderr server)))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue