diff --git a/data/helpers.d/config b/data/helpers.d/config index 247d12d6f..5999387db 100644 --- a/data/helpers.d/config +++ b/data/helpers.d/config @@ -66,7 +66,7 @@ _ynh_app_config_apply_one() { "set__${bind%%(*}" $short_setting $type $bind elif [[ "$bind" == "null" ]]; then - continue + return # Save in a file elif [[ "$type" == "file" ]]; then diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 0e38423f2..a4afdaf88 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -542,7 +542,7 @@ ynh_read_var_in_file() { fi # Remove comments if needed - local expression="$(echo "$expression_with_comment" | sed "s@$comments[^$string]*\$@@g" | sed "s@\s*[$endline]*\s*]*\$@@")" + local expression="$(echo "$expression_with_comment" | sed "s@${comments}[^$string]*\$@@g" | sed "s@\s*[$endline]*\s*]*\$@@")" local first_char="${expression:0:1}" if [[ "$first_char" == '"' ]]; then @@ -620,7 +620,7 @@ ynh_write_var_in_file() { fi # Remove comments if needed - local expression="$(echo "$expression_with_comment" | sed "s@$comments[^$string]*\$@@g" | sed "s@\s*[$endline]*\s*]*\$@@")" + local expression="$(echo "$expression_with_comment" | sed "s@${comments}[^$string]*\$@@g" | sed "s@\s*[$endline]*\s*]*\$@@")" endline=${expression_with_comment#"$expression"} endline="$(echo "$endline" | sed 's/\\/\\\\/g')" value="$(echo "$value" | sed 's/\\/\\\\/g')"