From 49ec93a9c57f5a3fd1c734c8da09967e2d1809ab Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 21 Feb 2019 01:31:31 +0100 Subject: [PATCH] default argument for a optional argument --- data/helpers.d/psql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/helpers.d/psql b/data/helpers.d/psql index f5e076d4f..47804f585 100644 --- a/data/helpers.d/psql +++ b/data/helpers.d/psql @@ -72,7 +72,7 @@ ynh_psql_execute_file_as_root() { # | arg: user - the user to grant privilegies ynh_psql_create_db() { local db=$1 - local user=$2 + local user=${2:-} local sql="CREATE DATABASE ${db};"