Skip to content

[Windows] No need to execute the profile of Powershell when upgrading flutter #120785

@WHYBBE

Description

@WHYBBE

Steps to Reproduce

  1. Run flutter upgrade on Windows, when there is an update.
  2. Then you can see cowsay and some errors. (Commands can be added to the profile to reproduce)
  3. But the update is performed normally.

Logs

PS C:\xx> flutter upgrade
Upgrading Flutter to 3.7.3 from 3.7.2 in C:\opt\flutter...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 248290d6d50a1bf1a6a246544347c03acda867a5...
 --------------
< Hello world! >
 --------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
Set-PSReadLineOption: C:\Users\Hex57\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:13
Line |
  13 |  Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionVi ��
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The predictive suggestion feature cannot be enabled because the console output doesn't support virtual terminal
     | processing or it's redirected.
Expanding downloaded archive...

Reason

I know it's because of my profile(in $profile) of my Powershell.

There are some scripts need to be executed in an interactive environment.

This is part of my $profile:

echo "Hello world!"  # instead of `cowsay "Hello world!"`
Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionViewStyle ListView

But it is not necessary to be executed when updating flutter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions