aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-29 09:30:00 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-29 09:30:00 +0100
commitd09ce3f91b9f064d623aed03c0d5ab1f472df918 (patch)
tree0edfe1bdc6e83d3b5d156b600502d4a2f7691453
parent1fe1bb96f2d7cf32e056496661bb5bed20b48edc (diff)
downloadguix-d09ce3f91b9f064d623aed03c0d5ab1f472df918.tar.gz
guix-d09ce3f91b9f064d623aed03c0d5ab1f472df918.zip
docker: Hide scary-looking but harmless tar failure messages.
* guix/docker.scm (build-docker-image): Wrap "tar --delete" invocation in 'with-error-to-port'.
-rw-r--r--guix/docker.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/docker.scm b/guix/docker.scm
index c19a24d45c..c6e9c6fee5 100644
--- a/guix/docker.scm
+++ b/guix/docker.scm
@@ -209,8 +209,13 @@ SRFI-19 time-utc object, as the creation time in metadata."
;; the path "/a" into "/". The presence of "/" in the archive is
;; probably benign, but it is definitely safe to remove it, so let's
;; do that. This fails when "/" is not in the archive, so use system*
- ;; instead of invoke to avoid an exception in that case.
- (system* "tar" "--delete" "/" "-f" "layer.tar")
+ ;; instead of invoke to avoid an exception in that case, and redirect
+ ;; stderr to the bit bucket to avoid "Exiting with failure status"
+ ;; error messages.
+ (with-error-to-port (%make-void-port "w")
+ (lambda ()
+ (system* "tar" "--delete" "/" "-f" "layer.tar")))
+
(for-each delete-file-recursively
(map (compose topmost-component symlink-source)
symlinks))