Skip to content

Commit

Permalink
yegor256#648 using dd doesn't cause SIGPIPE
Browse files Browse the repository at this point in the history
  • Loading branch information
krzyk authored and krzyk committed Dec 20, 2014
1 parent a15a0c5 commit aac0831
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/main/resources/com/rultor/agents/req/_head.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,7 @@ function docker_when_possible {
done
cd ..
if [ -n "${directory}" ]; then
# @todo #633 For some reason the pipes inside use_image are giving non-zero
# exit code although the result filename is correct. Find out why it is
# happening and remove unsetting of pipefail below
set +o pipefail
use_image="yegor256/rultor-$(cat /dev/urandom | tr -cd 'a-z0-9' | head -c 8)"
set -o pipefail
use_image="yegor256/rultor-$(dd if=/dev/urandom bs=10k count=1 2>/dev/null | tr -cd 'a-z0-9' | head -c 8)"
docker build "${directory}" -t "${use_image}"
else
use_image="${image}"
Expand Down

0 comments on commit aac0831

Please sign in to comment.