4 ms·
>this convoluted mess of bash is a smell isn’t it At a glance, I don't think so. At least, not the fact that the bash looks like a convoluted mess. Sometimes t
by MPSimmons 3y ago
>this convoluted mess of bash is a smell isn’t it
At a glance, I don't think so. At least, not the fact that the bash looks like a convoluted mess. Sometimes that's how a tight bash script looks (whether it SHOULD be tight or not is a different argument).
For me, the thing that looks suspicious is the repeated tr calls. If I see that, I assume someone is trying to be clever, where 'clever' here is a pejorative. If I were a maintainer and someone checked that in, I'd ask them to walk me through what it was doing, because there's almost always a better solution to avoid chaining things like that.
The real problem here is that there wasn't another maintainer to look at this code being brought in. A critical piece of the stack relied on a single person who, in this case, was malicious.