Skip to content

Commit 79e361c

Browse files
vlxmc-ehrlichjuliusmarminge
authored
fix: fix password substitution in start-database scripts (#1764)
Co-authored-by: Christopher Ehrlich <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
1 parent c944c49 commit 79e361c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/loud-pugs-bathe.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-t3-app": patch
3+
---
4+
5+
fix: fix password substitution in start-database scripts

cli/template/extras/start-database/mysql.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if [ "$DB_PASSWORD" == "password" ]; then
3636
exit 1
3737
fi
3838
DB_PASSWORD=$(openssl rand -base64 12)
39-
sed -i -e "s/:password@/:$DB_PASSWORD@/" .env
39+
sed -i -e "s#:password@#:$DB_PASSWORD@#" .env
4040
fi
4141

4242
docker run --name $DB_CONTAINER_NAME -e MYSQL_ROOT_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=project1 -d -p 3306:3306 docker.io/mysql

cli/template/extras/start-database/postgres.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if [ "$DB_PASSWORD" = "password" ]; then
3636
exit 1
3737
fi
3838
DB_PASSWORD=$(openssl rand -base64 12)
39-
sed -i -e "s/:password@/:$DB_PASSWORD@/" .env
39+
sed -i -e "s#:password@#:$DB_PASSWORD@#" .env
4040
fi
4141

4242
docker run --name $DB_CONTAINER_NAME -e POSTGRES_PASSWORD=$DB_PASSWORD -e POSTGRES_DB=project1 -d -p 5432:5432 docker.io/postgres

0 commit comments

Comments
 (0)