From 3e2b19fcf99849e3a748146d083283dcc9ce8a6b Mon Sep 17 00:00:00 2001 From: Clark Hale Date: Tue, 15 Nov 2016 12:37:57 -0500 Subject: [PATCH] Corrected save-artifacts example to prevent tar stream corruption. The pushd and popd commands in the example for save-artifacts example emit output to standard out. This will corrupt the tar stream, and prevent the reuse of the saved artifacts. --- docs/builder_image.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/builder_image.md b/docs/builder_image.md index 520cd3f31..3d1198911 100644 --- a/docs/builder_image.md +++ b/docs/builder_image.md @@ -123,12 +123,14 @@ The `save-artifacts` script is responsible for gathering all the dependencies in ``` #!/bin/bash -pushd ${HOME} +# Besides the tar command, all other output to standard out must +# be surpressed. Otherwise, the tar stream will be corrupted. +pushd ${HOME} >/dev/null if [ -d deps ]; then # all deps contents to tar stream tar cf - deps fi -popd +popd >/dev/null ```