Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Nitro CLI] Force non-interactive mode when output format is set - #9844

#9844
Merged
tobias-tengler merged 1 commit into
mainChilliCream/graphql-platform:mainfrom
tte/fix-output-json-for-interactive-terminalsChilliCream/graphql-platform:tte/fix-output-json-for-interactive-terminalsCopy head branch name to clipboard
Jun 4, 2026
Merged

[Nitro CLI] Force non-interactive mode when output format is set#9844
tobias-tengler merged 1 commit into
mainChilliCream/graphql-platform:mainfrom
tte/fix-output-json-for-interactive-terminalsChilliCream/graphql-platform:tte/fix-output-json-for-interactive-terminalsCopy head branch name to clipboard

Conversation

@tobias-tengler

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 4, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures Nitro CLI commands behave non-interactively whenever an output format (currently --output json) is selected, even when running in an interactive TTY. This aligns CLI behavior with the option’s intent (“enables non-interactive mode”) and prevents prompts/progress UI from appearing in structured output scenarios.

Changes:

  • Update NitroConsole.IsInteractive to return false whenever output is not human-readable (i.e., an output format is set).
  • Adjust the command test harness to simulate an interactive terminal while using --output json, ensuring coverage of the intended behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Nitro/CommandLine/test/CommandLine.Tests/Commands/CommandTestBase.cs Updates JSON-output test setup to simulate an interactive TTY while asserting --output json still forces non-interactive behavior.
src/Nitro/CommandLine/src/CommandLine/Services/Console/NitroConsole.cs Makes interactivity conditional on human-readable output, so selecting an output format disables interactive mode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tobias-tengler
tobias-tengler merged commit 30de1ac into main Jun 4, 2026
143 of 144 checks passed
@tobias-tengler
tobias-tengler deleted the tte/fix-output-json-for-interactive-terminals branch June 4, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.