Bug#872956: [debian-policy] warn about danger of pipe in shell snippet of makefile

2017-08-22 Thread Jonathan Nieder
Hi, Bastien ROUCARIÈS wrote: > set -e is not suffisant to detect error in pipe context > > cat nonexistant | sed s/some//g will hapilly return 0 and do not fail > > exec 3>&1; s=$(exec 4>&1 >&3; { cat nonexistant ; echo $? >&4; } | sed > s/some//g ) && exit $s > > this could be simplified by

Bug#872956: [debian-policy] warn about danger of pipe in shell snippet of makefile

2017-08-22 Thread Bastien ROUCARIÈS
Package: debian-policy Version: 4.0.1.0 Severity: normal set -e is not suffisant to detect error in pipe context cat nonexistant | sed s/some//g will hapilly return 0 and do not fail exec 3>&1; s=$(exec 4>&1 >&3; { cat nonexistant ; echo $? >&4; } | sed s/some//g ) && exit $s this could be