From 095eb6f89b1f9e21f65a2553aff1a8c0e4bee1ad Mon Sep 17 00:00:00 2001 From: Kurtis Jensen Date: Wed, 9 Apr 2025 17:21:26 -0400 Subject: [PATCH] Add -f flag to curl command The `-f` flag will make curl fail if there is an http error. This should prevent this command from silently failing (and adding literal "404 error" string to the config file). --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions b/functions index 3906cc6..3aff09c 100755 --- a/functions +++ b/functions @@ -48,7 +48,7 @@ service_create() { touch "$LINKS_FILE" if [[ -z $REDIS_CONFIG_PATH ]]; then - curl -sSL "https://raw.githubusercontent.com/redis/redis/${PLUGIN_IMAGE_VERSION:0:3}/redis.conf" >"$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX/redis.conf" || dokku_log_fail "Unable to download the default redis.conf to the config directory" + curl -sSLf "https://raw.githubusercontent.com/redis/redis/${PLUGIN_IMAGE_VERSION:0:3}/redis.conf" >"$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX/redis.conf" || dokku_log_fail "Unable to download the default redis.conf to the config directory" else cp "$REDIS_CONFIG_PATH" "$SERVICE_ROOT/$PLUGIN_CONFIG_SUFFIX/redis.conf" || dokku_log_fail "Unable to copy the ${REDIS_CONFIG_PATH} to the config directory" fi