RobinBlomberg / kysely-codegen

Generate Kysely type definitions from your database.
MIT License
773 stars 69 forks source link

Unable to use another env variable (zsh: unknown file attribute: B) #168

Open Mathieu-R opened 3 months ago

Mathieu-R commented 3 months ago

I'm trying to run kysely-codegen with another env variable since DATABASE_URL is already set in my .bashrc for another project.

So I set a DB_URL env variable in a .env file at the root of my project.

# .env

DB_URL=postgres://...

However, running the following command:

npx kysely-codegen --dialect=postgres --env-file=.env --url=env(DB_URL) --out-file=types/db.ts

I get the following error:

zsh: unknown file attribute: B

Seems like a problem with env(DB_URL)

Upvote & Fund

Fund with Polar