[llvm] [lit] Fix to make "RUN: env PATH=..." work as intended (PR #165308)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 27 14:09:04 PDT 2025
================
@@ -949,7 +945,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
path = (
cmd_shenv.env["PATH"] if "PATH" in cmd_shenv.env else shenv.env["PATH"]
----------------
arichardson wrote:
Yeah I agree that handling the PATH is unset case in the same way as a "real" shell shouldn't matter too much - I was just curious to see what happens if you do that. Using the parent env instead of some shell-dependent hardcoded value seems fine to me (or we just use the bash value of `/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.`).
https://github.com/llvm/llvm-project/pull/165308
More information about the llvm-commits
mailing list