docker: Hide scary-looking but harmless tar failure messages.

* guix/docker.scm (build-docker-image): Wrap "tar --delete" invocation
in 'with-error-to-port'.
This commit is contained in:
Ludovic Courtès 2018-11-29 09:30:00 +01:00
parent 1fe1bb96f2
commit d09ce3f91b
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 7 additions and 2 deletions

View File

@ -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))