Skip to content

Commit 1fd751e

Browse files
committed
Fix profiles bootstrap on fresh installs
1 parent 6a246fa commit 1fd751e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

install/bootstrap-s3-profiles.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if [[ "$COMPOSE_PROFILES" == "feature-complete" ]]; then
2222
if ! echo "$bucket_list" | grep -q "s3://profiles"; then
2323
apply_config_changes_profiles=0
2424
# Only touch if no existing profiles config is found
25-
if ! grep -q "filestore.profiles-backend" $SENTRY_CONFIG_YML; then
25+
if [[ -f "$SENTRY_CONFIG_YML" ]] && ! grep -q "filestore.profiles-backend" "$SENTRY_CONFIG_YML"; then
2626
if [[ -z "${APPLY_AUTOMATIC_CONFIG_UPDATES:-}" ]]; then
2727
echo
2828
echo "We are migrating the Profiles data directory from the 'sentry-vroom' volume to SeaweedFS."
@@ -66,7 +66,7 @@ if [[ "$COMPOSE_PROFILES" == "feature-complete" ]]; then
6666

6767
if [[ "$APPLY_AUTOMATIC_CONFIG_UPDATES" == 1 || "$apply_config_changes_profiles" == 1 ]]; then
6868
profiles_config=$(sed -n '/filestore.profiles-backend/,/s3v4"/{p}' sentry/config.example.yml)
69-
echo "$profiles_config" >>$SENTRY_CONFIG_YML
69+
echo "$profiles_config" >>"$SENTRY_CONFIG_YML"
7070
fi
7171
fi
7272

0 commit comments

Comments
 (0)