You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flutter command line causes cmd window to close on windows when git is missing #169784
We've recently had quite a few people with installation problems over on the FlutterDev discord report that running any flutter command causes their cmd window to close. This, of course, only happens on Windows.
We narrowed it down to the fact that shared.bat uses the EXIT command without /B in several places, causing the entire cmd window to close. Seeing as this is often used immediately after reporting an error, this means users never get a chance to see the actual error message.
We've seen this from people trying to run flutter without Git in their path, or without PowerShell in their path, but there may be other cases that can trigger the issue.
This can be worked around by spawning another CMD shell within the existing CMD prompt, then running flutter inside that - which causes the nested CMD to exit, but the parent CMD remains so the error message is visible.
I'm not actually on a Windows system so I'm unable to provide detailed reproduction steps, or information on whether this occurrs in PowerShell or not.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Move the check for Git in the PATH into the top level Windows flutter…
flutter-triage-bot commentedon Jun 2, 2025
This issue is missing a priority label. Please set a priority label when adding the
triaged-toollabel.Move the check for Git in the PATH into the top level Windows flutter…
Move the check for Git in the PATH into the top level Windows flutter…
Squashed commit of the following:
github-actions commentedon Jun 19, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Move the check for Git in the PATH into the top level Windows flutter…