• Chris Bracken's avatar
    Push /usr/bin to front of PATH for ios-deploy runs (#19281) · 379a2d56
    Chris Bracken authored
    ios-deploy relies on LLDB.framework, which relies on /usr/bin/python and
    the 'six' module that's installed on the system. However, it appears to
    use the first version of Python on PATH, rather than explicitly
    specifying the system install.  If a user has a custom install of Python
    (e.g., via Homebrew or MacPorts) ahead of the system Python on their
    PATH, LLDB.framework will pick up that version instead. If the user
    hasn't installed the 'six' module, ios-deploy will fail with a
    relatively cryptic error message.
    
    This patch pushes /usr/bin to the front of PATH for the duration of the
    ios-deploy run to avoid this scenario.
    
    This patch also removes checks for package six.
    
    Neither Flutter nor any of its direct dependencies/tooling relies on
    package six. ios-deploy depends on LLDB.framework (included with Xcode),
    which relies on a Python script that imports this package but uses
    whichever Python is at the front of the path. Flutter now invokes
    ios-deploy with a PATH with /usr/bin forced to the front in order to
    avoid this problem.
    
    We could have retained the check out of paranoia, but this seems
    unnecessary since it's entirely possible LLDB.framework may one day drop
    this dependency, in which case I'd expect the base system install of
    Python would likely drop it as well.
    379a2d56
ios_workflow_test.dart 13.4 KB