Skip to content
This repository was archived by the owner on Jan 14, 2021. It is now read-only.
This repository was archived by the owner on Jan 14, 2021. It is now read-only.

Client, Engine version incorrect when overriding binary with Prisma client constructor #696

@divyenduz

Description

@divyenduz

Bug description

With export DEBUG=*, Prisma client logs Engine, Client version.

These versions are correct

  1. For the default binary
  2. When a binary is replace with QUERY_ENGINE_BINARY_PATH env var

These versions are incorrect (incorrectly pointing to the default binary)

  1. When binary is overridden with Prisma client's constructor
const prisma = new PrismaClient({
  __internal: {
    engine: {
      cwd: process.cwd(),
      binaryPath: path.join(process.cwd(), './binaries/query-engine'),
    },
  },
})

How to reproduce

Steps to reproduce the behavior:

  1. Compile a custom binary and use Prisma client constructor to override it.
  2. Use DEBUG=*
  3. Run the client and execute a query against it.

Expected behavior

The logged version should be of the binary being used.

Metadata

Metadata

Assignees

Labels

bug/2-confirmedWe have confirmed that this is a bug.kind/bugA reported bug.tech/typescriptIssue for tech TypeScript.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions