Closed SeerLite closed 7 months ago
So the problem was the reference to "${3}"
?
Yes, the first commit just changes "$3"
to "${3:-}"
and second one replaces with the if
with a case
Thanks 👍🏻
The issues comes from using set -u
when there are not enough arguments provided. $3
is undefined and thus triggers the original error. ${3:-}
uses the empty fallback in this case to avoid the issue.
Previously showed "line 130: 3: unbound variable" instead of the pretty error message.