projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'chore/external-emoji-example' into 'develop'
[akkoma]
/
lib
/
pleroma
/
utils.ex
diff --git
a/lib/pleroma/utils.ex
b/lib/pleroma/utils.ex
index fa75a8c9930426ae7f5473d7dc3c0ce0b2f3db9f..bc0c953322338b347316b5414f4d3f36b78cfffb 100644
(file)
--- a/
lib/pleroma/utils.ex
+++ b/
lib/pleroma/utils.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Utils do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Utils do
@@
-30,7
+30,10
@@
defmodule Pleroma.Utils do
"""
@spec command_available?(String.t()) :: boolean()
def command_available?(command) 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"
end
@doc "creates the uniq temporary directory"