-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
The Flutter tool does not support the upgrade operation on the following configurations of the user's local Flutter repository:
- The current checkout is on a "Detached HEAD" state.
- The current checkout does not have an upstream.
- The checkout is not tracking an official upstream(aka "standard remote").
However, the doctor output still shows a ✓ for such cases in the Flutter section.
An example
$ ./bin/flutter doctor Building flutter tool... Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, 2.13.0-0.0.pre.601, on Artix Linux 5.17.3-artix1-1, locale en_IN.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [!] Android Studio (not installed) [✓] Connected device (2 available) [✓] HTTP Host Availability! Doctor found issues in 1 category.
$ git checkout HEAD^1
Note: switching to 'HEAD^1'.You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
...$ ./bin/flutter doctor
Building flutter tool...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 2.13.0-0.0.pre.600, on Artix Linux 5.17.3-artix1-1, locale en_IN.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] Connected device (2 available)
[✓] HTTP Host Availability! Doctor found issues in 1 category.
$ ./bin/flutter upgrade
Unable to upgrade Flutter: Your Flutter checkout is currently not on a release branch.
Use "flutter channel" to switch to an official channel, and retry. Alternatively, re-install Flutter by going to https://flutter.dev/docs/get-started/install.
Proposal
Highlight that the current install has issues with the git configuration by showing a ! in those cases.