Skip to content

Commit f707d20

Browse files
author
patched.codes[bot]
committed
Patched patchwork/common/tools/bash_tool.py
1 parent 89f0689 commit f707d20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

patchwork/common/tools/bash_tool.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import shlex
34
import subprocess
45
from pathlib import Path
56

@@ -45,7 +46,7 @@ def execute(
4546

4647
try:
4748
result = subprocess.run(
48-
command, shell=True, cwd=self.path, capture_output=True, text=True, timeout=60 # Add timeout for safety
49+
shlex.split(command), shell=False, cwd=self.path, capture_output=True, text=True, timeout=60 # Add timeout for safety
4950
)
5051
return result.stdout if result.returncode == 0 else f"Error: {result.stderr}"
5152
except subprocess.TimeoutExpired:

0 commit comments

Comments
 (0)