3 ms·
If Ben is reading the thread, tiny but important bug in the example script. It should have set -e at the top to ensure that a failed step will actually fail the
by zrail 4y ago
If Ben is reading the thread, tiny but important bug in the example script. It should have set -e at the top to ensure that a failed step will actually fail the script. Otherwise the snitch will always get called.
Edit: filed an issue on the docs repo: https://github.com/benbjohnson/litestream.io/issues/54 https://github.com/benbjohnson/litestream.io/issues/54
- benbjohnson 4y agoThanks for catching that! I fixed it up in a PR and merged in: https://github.com/benbjohnson/litestream.io/pull/55 https://github.com/benbjohnson/litestream.io/pull/55
- davnicwil 4y agoThis is so great - open source in action - I can't think of a more apt thing to come out of this post than an on the fly fix to the docs! Pun absolutely intended.
- creativemonkeys 4y agoIf I'm using "-e", I also like to use "set -o pipefail" which will fail the script if any command in a pipeline fails too: x | y | z, which is useful if 'y' fails but 'z' continues to process the output and returns 0, -e won't catch that (the example script doesn't use pipes though).
- zrail 4y agoYep, my standard bash header is set -eo pipefail with x if I need to see what's going on. This particular script didn't appear to be using pipes, as you say.