[PATCH 8/8] fetch2: Drop shell=True from runfetchcmd

Richard Purdie <[email protected]> Wed, 3 Jun 2026 11:48:40 +0100
Newsgroups org.openembedded.lists.bitbake-devel
Message-ID <[email protected]>
All users should be updated to use lists and we can drop the shell=True
fallback code.

Signed-off-by: Richard Purdie <[email protected]>
---
 lib/bb/fetch2/__init__.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index e3b8f5787b1..93d8b1820d8 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -979,10 +979,7 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None, extra
     error_message = ""
 
     try:
-        if isinstance(cmd, str):
-            (output, errors) = bb.process.run(cmd, log=log, shell=True, stderr=subprocess.PIPE, cwd=workdir, env=env)
-        else:
-            (output, errors) = bb.process.run(cmd, log=log, stderr=subprocess.PIPE, cwd=workdir, env=env)
+        (output, errors) = bb.process.run(cmd, log=log, stderr=subprocess.PIPE, cwd=workdir, env=env)
         success = True
     except bb.process.NotFoundError as e:
         error_message = "Fetch command %s not found" % (e.command)