Skip to content

make the logic to locate the Flutter SDK more robust #2307

Closed
@devoncarew

Description

@devoncarew

When running pub get on a Flutter project, I see:

Resolving dependencies... 
Because mp_chart depends on flutter_test any from sdk which doesn't exist (the Flutter SDK is not available), version solving failed.

This is when using the pub client that is embedded in the flutter sdk (flutter/bin/cache/dart-sdk/bin/pub). Currently the pub client only locates the Flutter sdk when the FLUTTER_SDK environment variable is set. We should expand this to also check if the specific instance of the pub tool itself is part of the Flutter sdk (something like using Platform.resolvedExecutable, and verifying it's location).

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