From d3c8a1bb2f5db3645adb11449d341251ccb2205d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Mon, 30 Nov 2015 19:02:12 +0100 Subject: [PATCH] [fix] Prevent error if unset variable is treated in utils helper --- data/apps/helpers.d/utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/apps/helpers.d/utils b/data/apps/helpers.d/utils index 87cd47f6b..a6755e3c8 100644 --- a/data/apps/helpers.d/utils +++ b/data/apps/helpers.d/utils @@ -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