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:
@@ -123,12 +123,14 @@ The `save-artifacts` script is responsible for gathering all the dependencies in
|
|||||||
```
|
```
|
||||||
#!/bin/bash
|
#!/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
|
if [ -d deps ]; then
|
||||||
# all deps contents to tar stream
|
# all deps contents to tar stream
|
||||||
tar cf - deps
|
tar cf - deps
|
||||||
fi
|
fi
|
||||||
popd
|
popd >/dev/null
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user