[libcxx-commits] [libcxx] [libcxx] [test] Quote the python executable in the executor (PR #68208)

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 9 04:27:12 PDT 2023


================
@@ -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'))}",
----------------
mstorsjo wrote:

Switched to `shlex.quote` now. Not ideal for Windows paths, but should work as long as we're using the lit internal shell.

https://github.com/llvm/llvm-project/pull/68208


More information about the libcxx-commits mailing list