Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: In ./start-database.sh DB_CONTAINER_NAME should be changed #1834

Closed
MahirAlam opened this issue Apr 21, 2024 · 0 comments · Fixed by #1871
Closed

bug: In ./start-database.sh DB_CONTAINER_NAME should be changed #1834

MahirAlam opened this issue Apr 21, 2024 · 0 comments · Fixed by #1871
Labels
🔰 good first issue Good for newcomers 👨‍👦‍👦free for all Anyone is free to take on this issue and file a PR 🐞❔ unconfirmed bug

Comments

@MahirAlam
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔰 good first issue Good for newcomers 👨‍👦‍👦free for all Anyone is free to take on this issue and file a PR 🐞❔ unconfirmed bug
Projects
None yet
2 participants