mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
excape parenthesis for shell
This commit is contained in:
parent
e5801be670
commit
714f58fbd6
3 changed files with 22 additions and 0 deletions
|
|
@ -454,6 +454,13 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
raise NotImplementedError
|
||||
|
||||
subprcs_cmd = " ".join(ffmpeg_args)
|
||||
if os.getenv("SHELL") in ("/bin/bash", "/bin/sh"):
|
||||
# Escape parentheses for bash
|
||||
subprcs_cmd = (
|
||||
subprcs_cmd
|
||||
.replace("(", "\\(")
|
||||
.replace(")", "\\)")
|
||||
)
|
||||
|
||||
# run subprocess
|
||||
self.log.debug("Executing: {}".format(subprcs_cmd))
|
||||
|
|
|
|||
|
|
@ -269,6 +269,13 @@ class ExtractReviewSlate(publish.Extractor):
|
|||
" ".join(output_args)
|
||||
]
|
||||
slate_subprocess_cmd = " ".join(slate_args)
|
||||
if os.getenv("SHELL") in ("/bin/bash", "/bin/sh"):
|
||||
# Escape parentheses for bash
|
||||
slate_subprocess_cmd = (
|
||||
slate_subprocess_cmd
|
||||
.replace("(", "\\(")
|
||||
.replace(")", "\\)")
|
||||
)
|
||||
|
||||
# run slate generation subprocess
|
||||
self.log.debug(
|
||||
|
|
|
|||
|
|
@ -455,6 +455,14 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
|||
# output file
|
||||
jpeg_items.append(path_to_subprocess_arg(dst_path))
|
||||
subprocess_command = " ".join(jpeg_items)
|
||||
if os.getenv("SHELL") in ("/bin/bash", "/bin/sh"):
|
||||
# Escape parentheses for bash
|
||||
subprocess_command = (
|
||||
subprocess_command
|
||||
.replace("(", "\\(")
|
||||
.replace(")", "\\)")
|
||||
)
|
||||
|
||||
try:
|
||||
run_subprocess(
|
||||
subprocess_command, shell=True, logger=self.log
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue