1
0
mirror of https://github.com/openshift/source-to-image.git synced 2026-02-05 12:44:54 +01:00

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.
This commit is contained in:
Clark Hale
2016-11-15 12:37:57 -05:00
committed by GitHub
parent 88c12c350b
commit 3e2b19fcf9

View File

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