Skip to content

Use the "same version" of pub when spawning build_runner in daemon #216

@DanTup

Description

@DanTup

Discussing #215 with @grouma, he noted that the daemon is just running pub here:

(Platform.isWindows ? [dartPath, pubSnapshot] : ['pub'])

This means if you have different versions of Dart on PATH than the one being used here, things may fail. I think it should always stick to the version of SDK that's running, so that it's possible to run commands from SDKs other than those on PATH (for example if you want to run from a Flutter SDK, but have a standard Dart/pub on PATH that's an older version).

It's possible the code already being used in the Windows case is doing this.

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