3 ms·
> Personally, I think Result types make a lot of sense -- a program either succeeds with some output, or fails with an explanation of why Usually, this is what
by moonchild 6y ago
> Personally, I think Result types make a lot of sense -- a program either succeeds with some output, or fails with an explanation of why
Usually, this is what happens. Usually, the error-signalling return is accompanied by a message (posted to stderr).
> By default, pipes stop piping if one command fails
set -o pipefail
- toastal 6y agopipefail is not available to POSIX shells like dash
- roryrjb 6y agoset -o pipefail is now part of POSIX[0] and I believe as soon as someone posts a patch to dash to implement it, it will get included[1]. [0]. https://www.austingroupbugs.net/view.php?id=789 https://www.austingroupbugs.net/view.php?id=789 [1]. https://lore.kernel.org/linux-dash/20200701015226.GA6839@gondor.apana.org.au/T/#t https://lore.kernel.org/linux-dash/20200701015226.GA6839@gon...
- toastal 6y agoThis is great! Thanks for posting it.