diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-18 14:20:48 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-18 14:20:48 (EDT) |
commit | d013138f8a1af30d29cd2413f6740346158abc35 (patch) | |
tree | dd66eda53f951688c572c1b255a394fe3668d273 | |
parent | 799b509b1fcbed2bf351294241056c494254a763 (diff) |
_ob_validate_var_name(): Abort on missing argument
-rw-r--r-- | lib/common.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/common.sh b/lib/common.sh index 0f13d1b..82a4519 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -29,7 +29,10 @@ _ob_abort() _ob_validate_var_name() { - case "${1}" in + local name="${1}" + shift 1 || _ob_abort + + case "${name}" in [!a-zA-Z_]*|*[!a-zA-Z0-9_]*) return 1 ;; |