Skip to content

where output on Windows may contain multiple paths #1109

Open
@jrfnl

Description

@jrfnl

As became clear when testing PR #1105, running shell_exec() with the Windows where command may return multiple paths.

Also see: #1105 (review)

Once #1105 will be merged, there will be three places in the codebase which use where/which to determine whether a CLI tool is available to be used and all three do so in a slightly different manner.

It may be worth creating a generic utility function in the Util\Common class to do command line tool path determination (correctly) and use that utility in those three places.

I imagine, the signature of the new method could look something like this:

public static function findExecutable(string $cmd): string|false

Places in the codebase where this type of path determination is done:

Also possibly relevant for #1107 ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions