Closed yut23 closed 1 year ago
Good catch. That's some old code from before I had learned all the insidious pitfalls of bash. I should probably go through the entire codebase with fresh eyes :-)
Also, this would make for an excellent shellcheck rule.
There we go :-) https://github.com/koalaman/shellcheck/issues/2847
The previous code was actually getting the exit code of
!
, which is always 0 inside the if statement.