Repository navigation
Write interactive prompts to stderr by default - #8812
Merged
Merged
Conversation
Contributor
Author
|
/snapit |
Contributor
|
🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm. Built from Test the snapshot by installing your package globally: pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261007110837Caution After installing, validate the version by running |
This was referenced Oct 7, 2026
isaacroldan
added this pull request to stack #8813
October 7, 2026 11:13
This was referenced Oct 7, 2026
1 of 4 tasks
# Conflicts: # packages/cli-kit/src/public/node/ui.test.ts
gonzaloriestra
approved these changes
Oct 7, 2026
Contributor
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/node/system.d.ts@@ -104,9 +104,9 @@ export declare function sleep(seconds: number): Promise<void>;
*/
export declare function terminalSupportsHyperlinks(): boolean;
/**
- * Check if the standard input and output streams support prompting.
+ * Check if standard input and standard error are terminals that support prompting.
*
- * @returns True if the standard input and output streams support prompting.
+ * @returns True if standard input and standard error support prompting.
*/
export declare function terminalSupportsPrompting(): boolean;
/**
|
karreiro
approved these changes
Oct 7, 2026
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.
WHY are these changes introduced?
Interactive prompts write to stdout, which mixes prompt text and terminal control codes with command results.
WHAT is this pull request doing?
Default all shared prompts to stderr while keeping explicit output stream overrides. Require stdin and stderr to be terminals, so redirecting stdout still allows prompts and redirecting stderr disables them.
How to manually test your changes?
Run
shopify kitchen-sink prompts > /tmp/shopify-prompt-results.txtin an interactive terminal and complete the example prompts. Prompts should remain visible and interactive, and the stdout file should stay empty.Run
shopify kitchen-sink prompts 2> /tmp/shopify-prompts.txt. It should fail before asking for input, even though stdout is still a terminal.Validation
Focused prompt, system, and command tests pass. CLI kit lint, type checks, and build pass. Real terminal probes verify all five prompt types with stdout redirected, and verify that redirecting stderr blocks prompts even when stdout is a terminal.
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset