Skip to content

Subprocess arbitrarily selects executable when multiple exist in PATH #210

@SimplyDanny

Description

@SimplyDanny

Given multiple executables with the same name in PATH, Subprocess.run selects an arbitrary one. I stumbled upon that with Swiftly picking either Xcode's swift or the one it installed itself.

You can argue, tools should use absolute paths to call binaries. However, relying on the order defined in PATH is also valid.

I'll have a PR ready in a minute. It shows the issue better than any words would be able to explaining it here. Also see swiftlang/swiftly#463.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions