Skip to content

flutter run -d chrome --flavor <flavor> runs without error but flutter build web --flavor results in tool exiting #134197

@andrewkolos

Description

@andrewkolos

Flavors are only an officially supported feature for Android, iOS, and (indirectly) MacOS. Running flutter build web --flavor strawberry will result in the tool exiting with this message:

Could not find an option named "flavor".

Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.

However, one can run flutter run -d chrome --flavor strawberry, and the app will run without issue. At best, this is potentially confusing. At worst, it could result in Flutter accidentally supporting flavors for web if/when we add more flavors-related features to the framework.

We should also exit the tool when the user tries to use --flavor with flutter run -d chrome.

I recommend resolving this before implementing #21682

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listteam-toolOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions