[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 08:01:03 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:

```suggestion
        default=default=subprocess.list2cmdline(sys.executable,str(Path(file).resolve().parent.parent.parent / 'run.py')),
```

Wouldn't this be easier?

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


More information about the libcxx-commits mailing list