bug: In ./start-database.sh DB_CONTAINER_NAME should be changed #1834
Labels
🔰 good first issue
Good for newcomers
👨👦👦free for all
Anyone is free to take on this issue and file a PR
🐞❔ unconfirmed bug
Provide environment information
System:
OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (4) x64 Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz
Memory: 1.46 GB / 2.85 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.12.2 - ~/.local/share/pnpm/node
npm: 10.5.0 - ~/.local/share/pnpm/npm
pnpm: 9.0.4 - ~/.local/share/pnpm/pnpm
Describe the bug
It is very unexpected bug!
I always cleate a folder then use the command (create t3-app).
So, in the name section I use a dot (.)
and then after finished creating my app when I run ./start-database.sh,
It gives me error!
SO, I think we should check the project name is a . (dot) then if it is, use any hard coded name?
Reproduction repo
No need!
To reproduce
Simply run the command npx create-t3-app and in the name section use a . (dot) to use the directory name instead of a new one.
Additional information
I guess this solution can be implemented in
create-t3-app/cli/template/extras/start-database/postgres.sh
solution 👇👇
if ( project1=="." )
then
DB_CONTAINER_NAME="${PWD##*/}-postgres"
else
DB_CONTAINER_NAME="project1-postgres"
fi
echo "creating Database container as $DB_CONTAINER_NAME"
The text was updated successfully, but these errors were encountered: