diff mbox series

[bug#49348,v2,4/4] build: pack: Mute error output when checking if tar supports --sort.

Message ID 20210706211139.2806-4-maxim.cournoyer@gmail.com
State Accepted
Headers show
Series [bug#49348,v2,1/4] pack: Allow embedding custom control files in deb packs. | expand

Commit Message

Maxim Cournoyer July 6, 2021, 9:11 p.m. UTC
* guix/build/pack.scm (tar-base-options) [tar-supports-sort?]: Redirect error
output to void.
---
 guix/build/pack.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/guix/build/pack.scm b/guix/build/pack.scm
index 05c7a3c594..3b73d1b227 100644
--- a/guix/build/pack.scm
+++ b/guix/build/pack.scm
@@ -27,8 +27,10 @@  deterministically.  When TAR, a GNU tar command file name, is provided, the
 '(\"gzip\" \"-9n\"), is provided, the compressor is explicitly specified via
 the `-I' option."
   (define (tar-supports-sort? tar)
-    (zero? (system* tar "cf" "/dev/null" "--files-from=/dev/null"
-                    "--sort=name")))
+    (with-error-to-port (%make-void-port "w")
+      (lambda ()
+        (zero? (system* tar "cf" "/dev/null" "--files-from=/dev/null"
+                        "--sort=name")))))
 
   `(,@(if compressor
           (list "-I" (string-join compressor))