Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
suppress popd/pushd output
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsdave committed Sep 9, 2017
1 parent 7966de5 commit 6cf16ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/assess-image-risk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ CLAIR_ENDPOINT=http://$(docker inspect --format '{{ .NetworkSettings.IPAddress }
#
DOCKER_IMAGE_EXPLODED_TAR_DIR=$(mktemp -d 2> /dev/null || mktemp -d -t DAS)
echo_if_verbose "saving docker image '$DOCKER_IMAGE_TO_ANALYZE' to '$DOCKER_IMAGE_EXPLODED_TAR_DIR'"
pushd "$DOCKER_IMAGE_EXPLODED_TAR_DIR" || echo "only here to avoid shellcheck's SC2164" > /dev/null
pushd "$DOCKER_IMAGE_EXPLODED_TAR_DIR" > /dev/null || echo "only here to avoid shellcheck's SC2164"
docker save "$DOCKER_IMAGE_TO_ANALYZE" | tar xv > /dev/null
popd || echo "only here to avoid shellcheck's SC2164" > /dev/null
popd > /dev/null || echo "only here to avoid shellcheck's SC2164"
LAYERS=$(jq ".[0].Layers[]" < "$DOCKER_IMAGE_EXPLODED_TAR_DIR/manifest.json" | sed -e 's|"||g' | sed -e 's|/layer.tar$||g')
echo_if_verbose "successfully saved docker image '$DOCKER_IMAGE_TO_ANALYZE'"

Expand Down

0 comments on commit 6cf16ab

Please sign in to comment.