[fix] Prevent error if unset variable is treated in utils helper

This commit is contained in:
Jérôme Lebleu 2015-11-30 19:02:12 +01:00
parent 13dd9b4f89
commit d3c8a1bb2f

View file

@ -12,7 +12,7 @@ ynh_get_plain_key() {
[[ "$line" =~ ^${prefix}[^#] ]] && return
echo $line
elif [[ "$line" =~ ^${prefix}${key}$ ]]; then
if [[ -n "$1" ]]; then
if [[ -n "${1:-}" ]]; then
prefix+="#"
key=$1
shift