summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-01 14:50:22 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-01 14:50:22 (EDT)
commit049771d914adbc998dcdd143bd53d07344a63f7f (patch)
treeae7142b1f2af5c79d39afcbeb3e19856e90314e5
parent5d950c81d9073daa2478a7724459f95ccf15fb03 (diff)
set_substvar(): Warn, don't error, on bad name
-rw-r--r--lib/substvars.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/substvars.sh b/lib/substvars.sh
index 5ef662b..d69c693 100644
--- a/lib/substvars.sh
+++ b/lib/substvars.sh
@@ -32,7 +32,8 @@ set_substvar()
name="$(printf '%s\n' "${name}" | tr 'A-Z-' 'a-z_')"
case "${name:- }" in
*[!a-z0-9_]*)
- error 2 "$(get_msg 'substvar_invalid')" "${name}"
+ warn "$(get_msg 'substvar_invalid')" "${name}"
+ return 1
;;
esac