From 98438a5d45068824d87fc8938095ae86dabc05bd Mon Sep 17 00:00:00 2001 From: Haralan Dobrev Date: Mon, 29 Aug 2022 20:45:26 +0300 Subject: [PATCH] Do not pass empty argument if insecure is not set --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 839102b..7073ad2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,6 +7,6 @@ if [[ "$MINIO_INSECURE" == "true" ]]; then insecure_option="--insecure" fi -mc alias set "$insecure_option" deploy "$MINIO_ENDPOINT" "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY" +mc alias set ${insecure_option:+"$insecure_option"} deploy "$MINIO_ENDPOINT" "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY" -mc mirror --overwrite "$insecure_option" $1 "deploy/$2" +mc mirror --overwrite ${insecure_option:+"$insecure_option"} $1 "deploy/$2"