create-t3-app icon indicating copy to clipboard operation
create-t3-app copied to clipboard

bug: generating a project on windows in folder . won't run start-database on WSL

Open TheDevilOnLine opened this issue 1 year ago β€’ 0 comments

Provide environment information

** Windows ** System: OS: Windows 11 10.0.22631 CPU: (24) x64 AMD Ryzen 9 7900X 12-Core Processor Memory: 58.33 GB / 95.21 GB Binaries: Node: 20.12.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD npm: 10.8.1 - C:\Program Files\nodejs\npm.CMD pnpm: 8.7.4 - ~\AppData\Local\pnpm\pnpm.CMD bun: 1.1.7 - ~.bun\bin\bun.EXE

** WSL ** System: OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish) CPU: (24) x64 AMD Ryzen 9 7900X 12-Core Processor Memory: 44.79 GB / 46.66 GB Container: Yes Shell: 5.1.16 - /bin/bash Binaries: Node: 18.20.0 - /usr/bin/node Yarn: 1.22.21 - /mnt/c/Users/tomma/AppData/Roaming/npm/yarn npm: 10.5.0 - /usr/bin/npm pnpm: 8.7.4 - /mnt/c/Users/tomma/AppData/Local/pnpm/pnpm bun: 1.0.3 - ~/.bun/bin/bun

Describe the bug

When you run npx create-t3-app@latest . on Windows, and then run ./start-database.sh on Ubuntu WSL, it first gives a warning, and then complains that the container name is invalid.

Reproduction repo

N/A

To reproduce

  • Run npx create-t3-app@latest . on Windows
  • Change the default password in .env
  • Go to the directory in WSL
  • Run ./start-database.sh
  • Observe the warning awk: warning: escape sequence /' treated as plain /'
  • Observe the error docker: Error response from daemon: Invalid container name ([full path]), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed.

Additional information

I noticed that line 12 of ./start-database.sh contains a full path for DB_CONTAINER_NAME, which seems to be causing the error as well.

TheDevilOnLine avatar Jul 02 '24 10:07 TheDevilOnLine