Spent almost the whole day having fun/sex with shell scripts. Bermi reviewed my PR, but suggested to add tests for the functionality I have added. Well, how can I refuse!
The problem is, SUT that I was supposed to test, returns 1. And the whole system is written using `set -eE`, meaning, any non-zero return is propagated to the top, like an exception.
I tried to change `set` (did not know how it works), tried to use `trap` (did not know how it works).
Eventually `set +e` did the job: in shell scripts, if you set +e, it does not propagate error, and if you set -e, it does. Reminds me Perl.
By the end of the day went to slack and checked if anybody writes me anything. It was Brad, he asked me if I ever bothered to check user alerts/cases, because I was on pager duty today. Oh, ok.
That's it for today. Learned a lot about scripting. The outcome: use normal languages, guys.