[libcxx-commits] [libcxx] [libcxx] [test] Quote the python executable in the executor (PR #68208)
Alexander Richardson via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 5 09:01:07 PDT 2023
Martin =?utf-8?q?Storsjö?= <martin at martin.st>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/68208/libcxx at github.com>
================
@@ -320,7 +325,7 @@ def getStdFlag(cfg, std):
Parameter(
name="executor",
type=str,
- default=f"\"{sys.executable}\" {Path(__file__).resolve().parent.parent.parent / 'run.py'}",
+ default=f"{quote(sys.executable)} {quote(str(Path(__file__).resolve().parent.parent.parent / 'run.py'))}",
----------------
arichardson wrote:
Hmm actually it looks like list2cmdline is a private implementation detail: https://github.com/python/cpython/blob/6e97a9647ae028facb392d12fc24973503693bd6/Lib/subprocess.py#L66 so should probably use shlex.quote() instead.
https://github.com/llvm/llvm-project/pull/68208
More information about the libcxx-commits
mailing list