Repository navigation
TML-3900: When nobody can answer a command's question, the error leads with the question in plain words - #396
Draft
wmadden-electric wants to merge 2 commits into
Draft
wmadden-electric wants to merge 2 commits into
wmadden-electric wants to merge 2 commits into
Conversation
…d's question and says in plain words that the user has to choose Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…ne question or several, the engine is 0.10.1, and tests cover --yes with several questions Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
commit: |
wmadden-electric
marked this pull request as draft
November 20, 2026 23:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A command asks the user to choose what happens to something, and nobody can answer: the run is a script, or
--yeswas passed. The ORM'sprisma migration planis the first such command. A user removes a field, and the plan would drop a column that holds data.Before:
After:
The change
The old first line described the engine's prompt mechanism ("needs a statement", "the session is not interactive") in words a user does not know. The error conventions say the first line of an error says what failed. The command's own question already says that, so it becomes the first line, and the engine's sentence underneath uses plain words.
whyYou have to choose what happens, and this run cannot ask you.--yesYou have to choose what happens, and --yes does not choose for you.2 choices are needed, and this run cannot ask you.Two lines that report a flag which answered nothing are reworded the same way:
--delete Legcy answers no question; the questions are about Legacy, User.nickname.becomes--delete Legcy does not name Legacy or User.nickname.--confirm mydb answers no consent in this run; a statement flag is what answers these questions.becomes--confirm mydb does not choose what happens; --rename or --delete does.What does not change
The error code, the exit code, the next actions and
meta. No type, field or function is added. Scripts that branch on the code or readmetaare unaffected; anything that matched the old summary text needs the new text.Version
@prisma/cli-enginegoes from 0.10.0 to 0.10.1, as the engine version check requires for any change to the engine. Only error text changes, so it is a patch.After this
The ORM asserts the old text in its tests and docs. It takes the new text when it moves to this engine version.
Agent: hammurabi-19