From: Joerg Behrmann Date: Fri, 30 Sep 2022 09:51:49 +0000 (+0200) Subject: use os.fspath instead of str to stringify run arguments X-Git-Tag: v14~21^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7d9b53d8da9bfd9f3afd89fc237b133b8172e3c;p=thirdparty%2Fmkosi.git use os.fspath instead of str to stringify run arguments str and bytes pass through it as is, but things supporting the __fspath__ protocol, like pathlib.Path, will use that. --- diff --git a/mkosi/backend.py b/mkosi/backend.py index ab1b504ad..ee7503426 100644 --- a/mkosi/backend.py +++ b/mkosi/backend.py @@ -833,7 +833,7 @@ def run( env: Mapping[str, Any] = {}, **kwargs: Any, ) -> CompletedProcess: - cmdline = [str(x) for x in cmdline] + cmdline = [os.fspath(x) for x in cmdline] if "run" in ARG_DEBUG: MkosiPrinter.info(f"+ {shell_join(cmdline)}")