Skip to content

Commit f7f4362

Browse files
use shlex to replace split instead (#174)
1 parent f8af02e commit f7f4362

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

charon/pkgs/signature.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import subprocess
1919
import asyncio
2020
import logging
21+
import shlex
2122
from jinja2 import Template
2223
from typing import Awaitable, Callable, List, Tuple
2324
from charon.storage import S3Client
@@ -81,8 +82,8 @@ async def sign_file(
8182
logger.debug(".asc file %s existed, skipping", remote)
8283
return
8384

84-
run_command = Template(command)
85-
result = await __run_cmd_async(run_command.render(key=key, file=artifact).split())
85+
run_command = Template(command).render(key=key, file=artifact)
86+
result = await __run_cmd_async(shlex.split(run_command))
8687

8788
if result.returncode == 0:
8889
generated_signs.append(local)

0 commit comments

Comments
 (0)