Very small bug - When you use an incorrect arch for the arch option, there is a comma after the last correct arch.
This is because the allowedArches array has undefined as its last item, so the join method is adding a comma after the last arch. The fix is to move the undefined check out of the allowedArches.includes() check.