From 5aeb8ec0df3600c59c7f6b540139a7169c5360f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthieu=20Berthom=C3=A9?= Date: Thu, 16 May 2024 21:14:17 +0200 Subject: [PATCH] shlex.join --- unmanic/libs/workers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unmanic/libs/workers.py b/unmanic/libs/workers.py index 9593e6ef..6aa5217f 100644 --- a/unmanic/libs/workers.py +++ b/unmanic/libs/workers.py @@ -32,6 +32,7 @@ import hashlib import os import queue +import shlex import shutil import subprocess import threading @@ -562,7 +563,7 @@ def __exec_command_subprocess(self, data): # Log the command for debugging command_string = exec_command if isinstance(exec_command, list): - command_string = ' '.join(exec_command) + command_string = shlex.join(exec_command) self._log("Executing: {}".format(command_string), level='debug') # Append start of command to worker subprocess stdout