GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Show Prisma CLI path in version output by oathis · Pull Request #29614 · prisma/orm

Conversation

@oathis

@oathis oathis commented May 30, 2026

Copy link
Copy Markdown

Summary

  • add the resolved Prisma CLI script path to prisma -v / prisma version output
  • sanitize the path in the existing version command snapshot

Tests

  • npx prettier --check packages/cli/src/Version.ts packages/cli/src/__tests__/commands/Version.test.ts
  • git diff --check

Note: I attempted corepack pnpm --filter prisma test -- Version.test.ts, but this local Windows checkout could not build/link workspace packages such as @prisma/engines after install. The changed snapshot covers the intended output shape.

Fixes #7771

@algora-pbc /claim #7771

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@oathis
show Prisma CLI path in version output
3c2629f
@CLAassistant

CLAassistant commented May 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented May 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 88ce86c6-5794-455e-a9b2-987ac31966da

📥 Commits

Reviewing files that changed from the base of the PR and between 42f9102 and 3c2629f.

📒 Files selected for processing (2)
  • packages/cli/src/Version.ts
  • packages/cli/src/__tests__/commands/Version.test.ts

Summary by CodeRabbit

  • New Features
    • The prisma version command now displays the path to the Prisma CLI executable, showing the location of the CLI binary on your system.

Walkthrough

This PR adds a "Prisma CLI path" field to the prisma -v version output, displaying the resolved absolute path of the executing Prisma CLI binary or "Unknown" if unavailable. Implementation and test snapshot are updated together.

Changes

CLI Path Output

Layer / File(s) Summary
CLI path output implementation
packages/cli/src/Version.ts
Imports Node's path module and adds a "Prisma CLI path" row to the version table, resolving process.argv[1] via path.resolve() with "Unknown" fallback.
Test snapshot and sanitization
packages/cli/src/__tests__/commands/Version.test.ts
Version test snapshot is updated to include the new "Prisma CLI path" line, and cleanSnapshot is extended to replace the path value with PRISMA_CLI_PATH placeholder for stable test runs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding the Prisma CLI path to version output.
Description check ✅ Passed The description is related to the changeset, explaining the addition of CLI path to version output and snapshot sanitization.
Linked Issues check ✅ Passed The PR successfully implements the requirement from issue #7771 by adding the resolved Prisma CLI script path to the prisma -v output.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #7771: adding CLI path reporting to version output and updating test snapshots accordingly.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tensordreams

tensordreams commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for the focused change — the integration point (the rows array) and the sanitizer are right.

Blocking: the hand-written snapshot line is misaligned by one space. formatTable pads each label to the longest one (Default Engines Hash, 20 chars), so Prisma CLI path (15 chars) gets exactly 5 trailing spaces + : — 6 spaces before the colon; the snapshot line has 7. Since your sanitizer preserves the real padding, the snapshot can never match and the test fails. The fix is to actually run the test and let Jest write the snapshot rather than hand-editing it (the PR notes the local environment couldn't build — that's the missing step).

Also worth considering: path.resolve(process.argv[1]) points at the bin shim; fs.realpathSync would surface the actual install location.


We're triaging a large number of overlapping PRs for this issue. If we don't hear back within the next few days, we'll close this PR to keep the queue manageable.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tensordreams
tensordreams changed the base branch from main to v7 July 21, 2026 12:05
@tensordreams
tensordreams changed the base branch from v7 to main July 21, 2026 15:10
@tensordreams

tensordreams commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Hi @oathis — thanks for this, and apologies for the slow reply.

We're clearing the open PR backlog ahead of moving this codebase to a v7 branch, with the Prisma Next rewrite taking over main.

We are closing this one: the CLI path output has already landed in #29573, and the remaining test coverage and follow-up are being consolidated in #29613. Keeping another implementation open would duplicate that work.

Thanks for the time you put into it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tensordreams tensordreams closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Output path of current Prisma in -v

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@oathis @CLAassistant @tensordreams
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.