fix: rebar3 does not work with fmt -v arguments

This commit is contained in:
Artemiy Apostatov 2025-09-14 18:19:42 +04:00 committed by GitHub
parent 286f04c6ef
commit 2d8cc182e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,5 +10,10 @@
"This module requires (:tools tree-sitter)") "This module requires (:tools tree-sitter)")
(when (modulep! :editor format) (when (modulep! :editor format)
(unless (and (executable-find "rebar3") (zerop (car (doom-call-process "rebar3" "fmt" "-v")))) (unless (executable-find "erlfmt")
(warn! "Couldn't find erlfmt. Formatting will be disabled."))) (warn! "Couldn't find erlfmt. Formatting will be disabled.")))
(when (modulep! :editor format)
(unless (and (executable-find "rebar3")
(zerop (car (doom-call-process "rebar3" "format"))))
(warn! "Couldn't find rebar3 with format plugin installed (needed in Erlang module). Formatting will be disabled.")))