On 2/22/20 8:57 PM, James Browning via devel wrote: >> Looks like the second test is backwards. It's printing the message on a >> system where pipefail works. >> >> if (set -o pipefail) 2>/dev/null >> then >> echo "### Old sh - no pipefail" >> echo "### We can't test for errors during build" >> echo "### You will have to scan the log files." >> PURGE="${PURGE} pipefail" >> fi > I am reasonably sure that is happening because I rewrote that test. It > should probably replace the first line with. > > (set -o pipefail) 2>/dev/null > if [[ $? -ne 0 ]] > > or something roughly equivalent to test the exit code not the contents > from stdout.
It is checking the exit status. () is a subshell. $() captures stdout. It just needs this, which I just did: -if (set -o pipefail) 2>/dev/null +if ! (set -o pipefail) 2>/dev/null Sorry I missed this in the review. -- Richard
signature.asc
Description: OpenPGP digital signature
_______________________________________________ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel