sqids / sqids-bash

Official Bash port of Sqids. Generate short unique IDs from numbers.
https://sqids.org/bash
MIT License
11 stars 2 forks source link

Unbound variable mode #8

Closed mjf closed 4 months ago

mjf commented 4 months ago

Unbound variable causes the script to fail if invoked without arguments:

$ sqids
sqids: line 1026: mode: unbound variable

To fix this add = on line 986:

    local mode=

or perhaps

    local mode=''

so that the variable then will be bound while still empty and the test expresison on the line 1026 starts to work as intended. (PS: I won't PR for this.)

king-p3nguin commented 4 months ago

Thank you for the bug report! This is fixed now.