tools icon indicating copy to clipboard operation
tools copied to clipboard

_getExecutable inside LocalProcessManager is not being called with delegated environment

Open devoncarew opened this issue 9 months ago • 0 comments

Originally filed at https://github.com/flutter/flutter/issues/167944. In-lined from that issue:

Steps to reproduce

_getExecutable is internally called to get the valid executable for given command. It internally delegates to getExecutablePath method which determines the output.

getExecutablePath has platform parameter which defines how platform variables are retrieved. e.g. the default is LocalPlatform that delegates to io.Platform.

platform['path'] is used internally to scan for available executables. However if I want provide custom path variable to it through getExecutable and getExecutable then it's not possible as it is not propogated down to it.

Expected results

Allow to pass environment down to the function that looks for and validates executable.

Actual results

Cannot pass my custom path environment variable down to the function that looks for and validates executable.

devoncarew avatar May 21 '25 21:05 devoncarew