-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Bug: prisma version --json should suppress all non-json output #27005
Copy link
Copy link
Closed
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.
Description
Bug description
Related issue with an implemented fix: #25478
Severity
🔹 Minor: Unexpected behavior, but does not block development
Reproduction
As in referenced issue.
Expected vs. Actual Behavior
Expected:
prisma version --json
{
"prisma": "6.6.0",
"@prisma/client": "6.6.0",
<snip>
}
Actual:
prisma version --json
Prisma schema loaded from schema.prisma
{
"prisma": "6.6.0",
"@prisma/client": "6.6.0",
<snip>
}
Frequency
Consistently reproducible
Does this occur in development or production?
Both development and production
Is this a regression?
I have not tested if this is a regression, currently writing a starship custom command to render the prisma version in prompt and facing this issue. The assumption based on the referenced issue is that this was always broken as the --json flag does not seem to be respected as its name should imply.
Workaround
Undesirable conditional operations on command output, culminating in a well-formed call to jq
Prisma Schema & Queries
generator client {
provider = "prisma-client-js"
output = "./_generated"
}
datasource db {
provider = "sqlite"
url = "file:./dev.db"
}
model User {
id Int @id @default(autoincrement())
name String
email String @unique
}
Prisma Config
no prisma.config.tsLogs & Debug Info
// Debug logs here
Environment & Setup
- OS: nixos
- Database: sqlite
- Node.js version: 22.14.0
Prisma Version
Prisma schema loaded from schema.prisma
prisma : 6.6.0
@prisma/client : 6.6.0
Computed binaryTarget : linux-nixos
Operating System : linux
Architecture : x64
Node.js : v22.14.0
TypeScript : unknown
Query Engine (Node-API) : libquery-engine 0000000000000000000000000000000000000000 (at ../../../../../../nix/store/hk28hsc1rp67jysirx2aj46zjbnx5k7a-prisma-engines-6.6.0/lib/libquery_engine.node, resolved by PRISMA_QUERY_ENGINE_LIBRARY)
Schema Engine : schema-engine-cli 0000000000000000000000000000000000000000 (at ../../../../../../nix/store/hk28hsc1rp67jysirx2aj46zjbnx5k7a-prisma-engines-6.6.0/bin/schema-engine, resolved by PRISMA_SCHEMA_ENGINE_BINARY)
Schema Wasm : @prisma/prisma-schema-wasm 6.6.0-53.f676762280b54cd07c770017ed3711ddde35f37a
Default Engines Hash : f676762280b54cd07c770017ed3711ddde35f37a
Studio : 0.511.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.