publish: Keep compression disabled when zlib is missing.
Reported by David Thompson. * guix/scripts/publish.scm (%options)[--compression]: Warn if LEVEL > 0 and zlib is missing, and return RESULT.
This commit is contained in:
parent
72fb1b24d9
commit
053fa76ae7
|
@ -127,8 +127,14 @@ Publish ~a over HTTP.\n") %store-directory)
|
|||
(0
|
||||
(alist-cons 'compression %no-compression result))
|
||||
(level
|
||||
(alist-cons 'compression (compression 'gzip level)
|
||||
result)))))
|
||||
(if (zlib-available?)
|
||||
(alist-cons 'compression
|
||||
(compression 'gzip level)
|
||||
result)
|
||||
(begin
|
||||
(warning (_ "zlib support is missing; \
|
||||
compression disabled~%"))
|
||||
result))))))
|
||||
(option '("ttl") #t #f
|
||||
(lambda (opt name arg result)
|
||||
(let ((duration (string->duration arg)))
|
||||
|
|
Loading…
Reference in New Issue