Skip to content

lit can't find bash in nonstandard location (e.g. for MKS) #10063

@llvmbot

Description

@llvmbot
Bugzilla Link 9691
Version trunk
OS Windows XP
Blocks llvm/llvm-bugzilla-archive#9703
Attachments Patch for finding programs anywhere on the PATH
Reporter LLVM Bugzilla Contributor
CC @modocache

Extended Description

On Windows + Cmake + MKS, LitConfig.py can't find bash because MKS bash can be in a non-standard location, i.e. outside of . or c:\bin

In MKS, you use regular DOS-style paths. In fact, bash is in c:\mks\mksnt\bash.exe on my system.

I have attached a patch to allows us to find bash wherever it exists on the path. It fixes what looks like an oversight in Util.which: that function will use the value of the PATH env var if the "paths" argument is None.
The patch simply adds the case where "paths" is an empty string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions