diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2021-01-21 20:20:35 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2021-01-21 20:20:35 +0300 |
commit | 2634a16b4cefebfb2a13550bde3fd12e5acd9aaa (patch) | |
tree | 1c43808f90f13a9e055464f01e4c8a36b28fe50b /lib/pleroma/utils.ex | |
parent | b830605577f369d6b1a8730a5b3476ceea4fef5a (diff) | |
parent | d8860eaee46c9bc0a079e90dfb008c54923d7330 (diff) | |
download | pleroma-2634a16b4cefebfb2a13550bde3fd12e5acd9aaa.tar.gz |
Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags-rework
# Conflicts:
# CHANGELOG.md
Diffstat (limited to 'lib/pleroma/utils.ex')
-rw-r--r-- | lib/pleroma/utils.ex | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pleroma/utils.ex b/lib/pleroma/utils.ex index c6892dec2..bc0c95332 100644 --- a/lib/pleroma/utils.ex +++ b/lib/pleroma/utils.ex @@ -30,7 +30,10 @@ defmodule Pleroma.Utils do """ @spec command_available?(String.t()) :: boolean() def command_available?(command) do - match?({_output, 0}, System.cmd("sh", ["-c", "command -v #{command}"])) + case :os.find_executable(String.to_charlist(command)) do + false -> false + _ -> true + end end @doc "creates the uniq temporary directory" |