Re: [PATCH] config: Make sure profile.sh succeeds with set -e and set -o pipefail

2024-03-27 Thread Mark Wielaard
Hi Dmitry, On Wed, Mar 27, 2024 at 12:59:13AM +0200, Dmitry V. Levin wrote: > On Tue, Mar 26, 2024 at 09:49:48PM +0100, Mark Wielaard wrote: > > profile.sh might fail with set -o pipefail because: > > > > cat /dev/null "${prefix}/etc/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ' > > > > might fai

Re: [PATCH] config: Make sure profile.sh succeeds with set -e and set -o pipefail

2024-03-26 Thread Dmitry V. Levin
On Tue, Mar 26, 2024 at 09:49:48PM +0100, Mark Wielaard wrote: > profile.sh might fail with set -o pipefail because: > > cat /dev/null "${prefix}/etc/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ' > > might fail when there isn't an *.urls file the first command in the > pipe fails (the 2>/dev/null

[PATCH] config: Make sure profile.sh succeeds with set -e and set -o pipefail

2024-03-26 Thread Mark Wielaard
profile.sh might fail with set -o pipefail because: cat /dev/null "${prefix}/etc/debuginfod"/*.urls 2>/dev/null | tr '\n' ' ' might fail when there isn't an *.urls file the first command in the pipe fails (the 2>/dev/null is there to hide that failure). This can be fixed by adding || echo -n ""