Repository navigation
Conversation
Lyokone
had a problem deploying
to
CI Environment
October 20, 2026 15:17 — with
GitHub Actions
Failure
The CLI only skipped its prompts on CI. When a script or an AI coding agent ran it without a terminal and without `CI` set, the first prompt waited forever for an answer that could never come. The CLI is now non-interactive on CI or when stdin is not a terminal. `stdin.hasTerminal` alone is not enough: it is also true for other character devices such as `/dev/null`, the stdin many tools run commands with, so stdin's echo mode is read as well. When non-interactive, each prompt either uses the value given by the flags, or exits with an error naming the flag to pass (`--platforms`, `--plugins`, `--out`, `--overwrite-firebase-options`, ...). The prompt helpers throw a `NonInteractiveException` as a safety net for any call site that does not. Behavior in a terminal and on CI is unchanged, apart from prompts that used to hang on CI now failing with an error.
Lyokone
force-pushed
the
fix/non-interactive-no-tty
branch
from
October 21, 2026 07:16
72cc57e to
69cfc6e
Compare
SelaseKay
approved these changes
Oct 21, 2026
This branch was successfully deployed
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.
Description
The CLI only skipped its prompts on CI. Run by a script or an AI coding agent without a terminal (and without
CIset), the first prompt waited forever:flutterfire configureandflutterfire install latestwith stdin from/dev/nullboth hung until killed.The CLI is now non-interactive on CI or when stdin is not a terminal (
isNonInteractiveincommon/utils.dart).stdin.hasTerminalalone is not enough: it is also true for other character devices such as/dev/null, which many tools use as stdin, so stdin's echo mode is read as well (it throws unless stdin is a real terminal).When non-interactive, each prompt either uses the value given by the flags or exits 1 with an error naming the flag to pass, for example:
isCIcheck guarding a prompt now usesisNonInteractive, and the messages name the flag (--platforms,--out,--android-out,--ios-build-config/--ios-target,--overwrite-firebase-options, ...).firebase.json?" question, an invalid--out, the Apple service file path, and overwriting an existingfirebase_options.dart.NonInteractiveExceptioninstead of callinginteractas a safety net for any other call site.--versionskips the update check without a terminal, as it already did on CI.Behavior in a terminal is unchanged (checked with a pty). On CI it is unchanged too, except that prompts that used to hang there now fail with an error. Piping answers in (
yes | flutterfire ...) never worked withinteractand now fails fast instead of hanging.Testing
test/non_interactive_test.dart(21 tests): fake stdin throughIOOverrides(pipe,/dev/null, terminal), plus the real CLI as a subprocess with stdin piped and from/dev/null. With the fix reverted, 15 of them fail.dart analyze --fatal-infosclean, all offline tests pass (89).FIREBASE_TOKEN, and Windows.Type of Change
feat-- New feature (non-breaking change which adds functionality)fix-- Bug fix (non-breaking change which fixes an issue)!-- Breaking change (fix or feature that would cause existing functionality to change)refactor-- Code refactorci-- Build configuration changedocs-- Documentationchore-- Chore