[Pkg-zfsonlinux-devel] Bug#1030316: Bug#1030316: trim script always exits 1 despite not failing

Scott Colby debian at scott.scolby.com
Sun Apr 2 05:26:33 BST 2023


Hello again,

On Sat, Apr 1, 2023, at 18:46, наб wrote:
> a quick skim reveals
> this is because the final pipeline exits 1 because I used a && as an if;

Wow, thank you for noticing that! It makes perfect sense, but I hadn't
considered that particular difference between && and if. From the
The Open Group Base Specifications Shell Command Language chapter:

In 2018, https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_06 wrote:
> The exit status of an AND list shall be the exit status of the last
> command that is executed in the list.

vs.

In 2018, https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_07 wrote:
> The exit status of the if command shall be the exit status of the
> then or else compound-list that was executed, or zero, if none was executed.

Thanks!
Scott



More information about the Pkg-zfsonlinux-devel mailing list