[#2497] Customized exexec launch to support root operation (currently required by Gitlab CI).

This commit is contained in:
Ivan Tashkinov 2020-05-21 21:47:32 +03:00
commit 3a1e810aaa
6 changed files with 59 additions and 4 deletions

View file

@ -7,8 +7,6 @@ defmodule Pleroma.Helpers.MediaHelper do
Handles common media-related operations.
"""
@ffmpeg_opts [{:sync, true}, {:stdout, true}]
def ffmpeg_resize_remote(uri, %{max_width: max_width, max_height: max_height}) do
cmd = ~s"""
curl -L "#{uri}" |
@ -20,7 +18,7 @@ defmodule Pleroma.Helpers.MediaHelper do
cat
"""
with {:ok, [stdout: stdout_list]} <- Exexec.run(cmd, @ffmpeg_opts) do
with {:ok, [stdout: stdout_list]} <- Pleroma.Exec.cmd(cmd) do
{:ok, Enum.join(stdout_list)}
end
end