prisma-client-go icon indicating copy to clipboard operation
prisma-client-go copied to clipboard

Allow using env vars for all generator options

Open steebchen opened this issue 2 years ago • 2 comments

Defining env vars in the schema is only possible for fields which are known to the Prisma CLI, which means Go-specific options like package can only be hardcoded; using an env var does not work at this time.

generator client {
  provider = env("PRISMA_PROVIDER")
  output   = env("PRISMA_OUTPUT")
  package  = env("PRISMA_PACKAGE") // <- does not work at this time
}

related: #166

steebchen avatar Nov 02 '21 08:11 steebchen

I'll work on it

elmarsan avatar Nov 02 '21 08:11 elmarsan

Env support would happen in the Prisma CLI I believe, so I don't think changing anything in the Go client can solve this.

steebchen avatar Nov 03 '21 14:11 steebchen