I need to run a shell script in hudson. That script needs an answer from the user. To give an automatic answer I did the following command line :
yes
I had this error, and my problem with it is not that it output yes: standard output: Broken pipe
but rather than it returns an error code.
Because I run my script with bash strict mode including -o pipefail
, when yes "errors" it causes my script to error.
The way I avoided this is like so:
bash -c "yes || true" | my-script.sh